From: Fabrice Marchant <fabricemarchant@free.fr>
To: caml-list@inria.fr
Subject: Re: [Caml-list] Compose function for multiple parameters ?
Date: Sat, 31 May 2008 18:05:20 +0200 [thread overview]
Message-ID: <20080531180520.11b32a50@free.fr> (raw)
In-Reply-To: <Pine.LNX.4.64.0805311324050.9181@martin.ec.wink.com>
On Sat, 31 May 2008 13:24:55 +0200 (CEST)
Martin Jambon <martin.jambon@ens-lyon.org> wrote:
> On Sat, 31 May 2008, Fabrice Marchant wrote:
>
> >> It would be cooler to write the later on the basis of :
> >> (( <<- ) (( <<- ) f)) g
> >
> > Sorry, I just discover that this is cleaner :
> > (( <<- ) <<- ( <<- ))
> >
> > and extendable to any number of parameters.
> >
> > (( <<- ) <<- ( <<- ) <<- ( <<- ))
> > to compose with a 3 parameters function.
>
> Personally, I call this obfuscated, not clean.
>
>
> Martin
OK, it's far to be perfect - funny at best. But what would be the right way ?
Defining the 2 ops :
let ( <<- ) f g x = f (g x)
let ( <<-- ) f g x y = f (g x y)
is it better ?
Regards,
Fabrice
next prev parent reply other threads:[~2008-05-31 17:58 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-31 7:24 Fabrice Marchant
2008-05-31 8:10 ` [Caml-list] " Fabrice Marchant
2008-05-31 11:24 ` Martin Jambon
2008-05-31 16:05 ` Fabrice Marchant [this message]
2008-06-01 8:39 ` Florent Monnier
[not found] ` <20080531180149.04e6ac5e@free.fr>
2008-05-31 21:37 ` Martin Jambon
2008-06-01 0:04 ` Robert Fischer
2008-06-01 5:24 ` Fabrice Marchant
2008-06-01 6:16 ` Fabrice Marchant
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=20080531180520.11b32a50@free.fr \
--to=fabricemarchant@free.fr \
--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).