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 mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by yquem.inria.fr (Postfix) with ESMTP id B204EBC6B for ; Tue, 18 Sep 2007 18:11:33 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAAHKV70ZQDPJhe2dsb2JhbACBWIw4AgkEBg0Y X-IronPort-AV: E=Sophos;i="4.20,269,1186351200"; d="scan'208";a="16375373" Received: from smtp23.orange.fr ([80.12.242.97]) by mail4-smtp-sop.national.inria.fr with ESMTP; 18 Sep 2007 18:12:40 +0200 Received: from me-wanadoo.net (localhost [127.0.0.1]) by mwinf2356.orange.fr (SMTP Server) with ESMTP id 0073A7000094 for ; Tue, 18 Sep 2007 18:12:40 +0200 (CEST) Received: from localhost.localdomain (Mix-Lyon-109-4-234.w193-250.abo.wanadoo.fr [193.250.28.234]) by mwinf2356.orange.fr (SMTP Server) with ESMTP id 2B9427000099 for ; Tue, 18 Sep 2007 18:12:39 +0200 (CEST) X-ME-UUID: 20070918161239178.2B9427000099@mwinf2356.orange.fr Date: Tue, 18 Sep 2007 16:12:46 +0200 From: Fabrice Marchant To: caml-list@yquem.inria.fr Subject: Re: [Caml-list] Having '<<', why to use '|>' ? Message-ID: <20070918161246.1ff37e29@localhost.localdomain> In-Reply-To: <20070918085310.GB12115@localhost> References: <20070917163617.0e6e0e7c@localhost.localdomain> <20070917222407.GB16678@jiyu.gnu> <20070918073933.3702220f@localhost.localdomain> <20070918085310.GB12115@localhost> 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; camlp:01 avoided:01 parser:01 'o':01 symmetric:01 cheers:01 caml-list:01 lex:01 caml:02 let:03 raise:03 identifiers:04 problem:05 simpler:05 inria:06 Thanks Julien ! > Have a look at this: > http://caml.inria.fr/pub/docs/manual-ocaml/lex.html#infix-symbol > With the keywords below. "Note that the following identifiers are keywords of the Camlp4 extensions and should be avoided for compatibility reasons. parser << <: >> $ $$ $: " So no doubt, I'll edit my old programs and replace "<<". > > ... a composition operator ... ( <<< ) ? > > What else ? > I would personally double the '@': > let (@@) f g x = f @ g x ( or f (g x) : it is practically the same thing. ) A 3 chars operator (<<<) doesn't look smart. Simpler is better. However, about (@@), I preferred to see the direction of the asymmetric composition operator. ( <| ) instead of ( << ) ? Is this a possible idea ? 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. Cheers, Fabrice