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 247D6BC6B for ; Mon, 17 Sep 2007 18:35:15 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAANJJ7kbAXQImk2dsb2JhbACBWIw9AgcEBgcg X-IronPort-AV: E=Sophos;i="4.20,265,1186351200"; d="scan'208";a="1317865" Received: from discorde.inria.fr ([192.93.2.38]) by mail2-smtp-roc.national.inria.fr with ESMTP; 17 Sep 2007 18:36:14 +0200 Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l8HGZedY020803 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=OK) for ; Mon, 17 Sep 2007 18:35:40 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAANJJ7kZQDPIakGdsb2JhbACBWIw9AgcCCA8RBQ X-IronPort-AV: E=Sophos;i="4.20,265,1186351200"; d="scan'208";a="16323762" Received: from smtp20.orange.fr ([80.12.242.26]) by mail4-smtp-sop.national.inria.fr with ESMTP; 17 Sep 2007 18:36:13 +0200 Received: from me-wanadoo.net (localhost [127.0.0.1]) by mwinf2027.orange.fr (SMTP Server) with ESMTP id 151A91C000C2 for ; Mon, 17 Sep 2007 18:36:13 +0200 (CEST) Received: from localhost.localdomain (Mix-Lyon-303-4-243.w193-248.abo.wanadoo.fr [193.248.106.243]) by mwinf2027.orange.fr (SMTP Server) with ESMTP id 71B8C1C000C0 for ; Mon, 17 Sep 2007 18:36:12 +0200 (CEST) X-ME-UUID: 20070917163612465.71B8C1C000C0@mwinf2027.orange.fr Date: Mon, 17 Sep 2007 16:36:17 +0200 From: Fabrice Marchant To: caml-list@inria.fr Subject: Having '<<', why to use '|>' ? Message-ID: <20070917163617.0e6e0e7c@localhost.localdomain> 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-Miltered: at discorde with ID 46EEACDC.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; functions:01 functions:01 let:03 let:03 exists:05 fabrice:08 fabrice:08 fun:08 n'a:12 writing:12 supersede:13 usually:13 case:13 wonder:14 does:14 Hello ! For f1 and f2 composable functions, writing : let ( << ) f g x = f (g x) let g1 = f2 << f1 let ( |> ) x f = f x let g2 = fun x -> x |> f1 |> f2 I usually use '<<' and wonder if we can always supersede '|>' by this operator ? g1 and g2 are same functions ( not true ? ). Does it exists a case where the use of '|>' is better ? Thanks, Fabrice ----------------------------------- Force est de constater que mon post sur Lucky et Camel n'a pas fait un tabac...