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=0.0 required=5.0 tests=AWL 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 51223BC6B for ; Tue, 18 Sep 2007 22:12:16 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ah4FAHnN70bUnw6Eg2dsb2JhbACCNotaAgkCCA8RBw X-IronPort-AV: E=Sophos;i="4.20,270,1186351200"; d="scan'208";a="1375698" Received: from pih-relay05.plus.net ([212.159.14.132]) by mail2-smtp-roc.national.inria.fr with ESMTP; 18 Sep 2007 22:13:24 +0200 Received: from [80.229.56.224] (helo=beast.local) by pih-relay05.plus.net with esmtp (Exim) id 1IXjRj-000471-S3 for caml-list@yquem.inria.fr; Tue, 18 Sep 2007 21:13:24 +0100 From: Jon Harrop Organization: Flying Frog Consultancy Ltd. To: caml-list@yquem.inria.fr Subject: Re: [Caml-list] Having '<<', why to use '|>' ? Date: Tue, 18 Sep 2007 17:42:27 +0100 User-Agent: KMail/1.9.7 References: <20070917163617.0e6e0e7c@localhost.localdomain> <20070918085310.GB12115@localhost> <20070918161246.1ff37e29@localhost.localdomain> In-Reply-To: <20070918161246.1ff37e29@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200709181742.27747.jon@ffconsultancy.com> X-Spam: no; 0.00; 'o':01 symmetric:01 ocaml:01 infix:01 ocaml:01 frog:98 wrote:01 caml-list:01 lsl:03 ops:03 raise:03 problem:05 simpler:05 maths:06 fabrice:08 On Tuesday 18 September 2007 15:12:46 Fabrice Marchant wrote: > A 3 chars operator (<<<) doesn't look smart. That is actually the F# for lsl. There are also ||| and &&& for bitwise ops. > Simpler is better. > 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"). > But maybe your idea is good. Maths use a kind of small 'o' : (f o g) (x) > = f (g (x)). It's symmetric like (@@), and that doesn't raise any problem. If an OCaml front-end handled unicode with appropriate symbol settings then you could use an "o" symbol to mean that infix operator. I think that is a good solution, provided you use an editor that supports suitable unicode and there is an easy way to enter such things. -- Dr Jon D Harrop, Flying Frog Consultancy Ltd. OCaml for Scientists http://www.ffconsultancy.com/products/ocaml_for_scientists/?e