Browse thread
Having '<<', why to use '|>' ?
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Vincent Aravantinos <vincent.aravantinos@y...> |
| Subject: | Re: [Caml-list] Having '<<', why to use '|>' ? |
Le 19 sept. 07 à 21:49, Fabrice Marchant a écrit : > On Tue, 18 Sep 2007 17:42:27 +0100 > Jon Harrop <jon@ffconsultancy.com> wrote: > >>> A 3 chars operator (<<<) doesn't look smart. >> That is actually the F# for lsl. There are also ||| and &&& for >> bitwise ops. > > Thanks Jon, happy to read you, > > So, do you think that (<<<) could replace (<<) as a function > composition operator ? > >>> However, about (@@), I preferred to see the direction of the >>> asymmetric >>> composition operator. ( <| ) instead of ( << ) ? Is this a >>> possible idea ? > >> But "<<" is the converse of ">>" (in F#) and "|>" has no converse >> (or you >> could say that "x |> f" is the converse of "f x"). > > Things must keep consistent, you're right. So, ( <| ) instead of > ( << ) > can't be used. > Julien proposed ( @@ ). > > However I saw it was used this way : > > let rec ( @@ ) l1 l2 = List.rev_append l1 l2;; ( Why rec ? ) > > here : > http://sourceforge.net/project/showfiles.php?group_id=178291 > > It would be useful that experimented OCaml people suggest a > replacement for the heavily used composition operator ( << ) that > is now reserved for camlp4... And how about (<<-) or (<--) ? Cheers, Vincent