caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Anil Madhavapeddy <anil@recoil.org>
To: Alessandro Baretta <a.baretta@studio.baretta.com>
Cc: Ocaml <caml-list@inria.fr>
Subject: Re: [Caml-list] Question on performance/style issue
Date: Fri, 24 Feb 2006 19:05:01 +0000	[thread overview]
Message-ID: <20060224190501.GA27740@fork.recoil.org> (raw)
In-Reply-To: <43FF2BC9.6030503@studio.baretta.com>

On Fri, Feb 24, 2006 at 04:52:41PM +0100, Alessandro Baretta wrote:
> I am very fond of the following "duality" operator.
> 
> let (++) x f = f x
> 
> I use to write complex computations legibly: instead of
> > h(g(f(x)))
> I write
> > x ++ f ++ g ++ h
> 
> What is the impact of the this programming style on execution performance?

>From a GC point of view, this is better than the alternative of
splitting up the calls into separate let bindings.  It's used in
the OCaml sources to make some long call-chains look nicer.


To reference the original post...
http://caml.inria.fr/pub/ml-archives/caml-list/2003/09/825011113899cde2b1b96cf7fc7a0f7b.en.html

-- 
Anil Madhavapeddy                                 http://anil.recoil.org
University of Cambridge                          http://www.cl.cam.ac.uk


  reply	other threads:[~2006-02-24 19:05 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-24 15:52 Alessandro Baretta
2006-02-24 19:05 ` Anil Madhavapeddy [this message]
2006-02-24 19:25   ` [Caml-list] " Alessandro Baretta
2006-02-25 11:14     ` Andrej Bauer
2006-02-27 22:37       ` David M. Cooke
2006-02-27 23:49         ` [Caml-list] " David Brown
2006-02-28 12:02           ` Alessandro Baretta
2006-02-28 12:04       ` [Caml-list] " Alessandro Baretta
2006-03-01  5:45 ` Nathaniel Gray
2006-03-01  8:34   ` Alessandro Baretta

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060224190501.GA27740@fork.recoil.org \
    --to=anil@recoil.org \
    --cc=a.baretta@studio.baretta.com \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).