From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: * X-Spam-Status: No, score=1.1 required=5.0 tests=AWL,DNS_FROM_RFC_POST autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by yquem.inria.fr (Postfix) with ESMTP id 4C1BCBC6B for ; Wed, 19 Sep 2007 23:48:13 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAAKI28UbB/BYfkGdsb2JhbACBWIw6AgEBBwQGBQoRBQ X-IronPort-AV: E=Sophos;i="4.20,275,1186351200"; d="scan'208";a="1432603" Received: from smtp20.orange.fr ([193.252.22.31]) by mail2-smtp-roc.national.inria.fr with ESMTP; 19 Sep 2007 23:49:30 +0200 Received: from me-wanadoo.net (localhost [127.0.0.1]) by mwinf2019.orange.fr (SMTP Server) with ESMTP id 57BA81C0008F for ; Wed, 19 Sep 2007 23:49:30 +0200 (CEST) Received: from localhost.localdomain (Mix-Lyon-109-2-80.w193-250.abo.wanadoo.fr [193.250.19.80]) by mwinf2019.orange.fr (SMTP Server) with ESMTP id 53AC21C00086 for ; Wed, 19 Sep 2007 23:49:29 +0200 (CEST) X-ME-UUID: 20070919214929342.53AC21C00086@mwinf2019.orange.fr Date: Wed, 19 Sep 2007 21:49:38 +0200 From: Fabrice Marchant To: caml-list@yquem.inria.fr Subject: Re: [Caml-list] Having '<<', why to use '|>' ? Message-ID: <20070919214938.76e4fa8b@localhost.localdomain> In-Reply-To: <200709181742.27747.jon@ffconsultancy.com> References: <20070917163617.0e6e0e7c@localhost.localdomain> <20070918085310.GB12115@localhost> <20070918161246.1ff37e29@localhost.localdomain> <200709181742.27747.jon@ffconsultancy.com> X-Mailer: Claws Mail 2.10.0 (GTK+ 2.10.13; i486-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam: no; 0.00; experimented:01 ocaml:01 camlp:01 sourceforge:01 wrote:01 rec:01 rec:01 caml-list:01 append:02 consistent:02 lsl:03 ops:03 let:03 tue:06 sep:06 On Tue, 18 Sep 2007 17:42:27 +0100 Jon Harrop 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... Regards, Fabrice