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 concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id 78EF3BC69 for ; Wed, 22 Aug 2007 10:24:46 +0200 (CEST) Received: from pih-relay04.plus.net (pih-relay04.plus.net [212.159.14.131]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id l7M8Oj0i020726 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO) for ; Wed, 22 Aug 2007 10:24:46 +0200 Received: from [80.229.56.224] (helo=beast.local) by pih-relay04.plus.net with esmtp (Exim) id 1INlW8-00005e-M8 for caml-list@yquem.inria.fr; Wed, 22 Aug 2007 09:24:45 +0100 From: Jon Harrop Organization: Flying Frog Consultancy Ltd. To: caml-list@yquem.inria.fr Subject: Re: [Caml-list] If OCaml were a car Date: Wed, 22 Aug 2007 09:13:38 +0100 User-Agent: KMail/1.9.7 References: <20070818192157.GA11789@furbychan.cocan.org> <20070819215924.6234b446.mle+ocaml@mega-nerd.com> <28fa90930708212250w15ce8fdai7fa615414d0279d@mail.gmail.com> In-Reply-To: <28fa90930708212250w15ce8fdai7fa615414d0279d@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200708220913.39184.jon@ffconsultancy.com> X-Miltered: at concorde with ID 46CBF2CD.004 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; ocaml:01 ocaml:01 iter:01 iter:01 frog:98 wrote:01 caml-list:01 vanilla:03 let:03 let:03 luca:04 puzzled:04 problem:05 somewhat:05 definition:07 On Wednesday 22 August 2007 06:50:24 Luca de Alfaro wrote: > The only thing about Ocaml I mind, is that it a bit like German is, in that > all the verbs at the end come. And there nothing wrong is, but it for some > strange reading makes, and it strange is that this from France comes. > > I still somewhat puzzled am, at reading: > > let f x = > [humonguous definition 50 lines spanning] > in List.iter f l > > because the only way I make sense of this can, is by first looking at where > f used is, and only then reading its definition. > I much rather write would: > > do List.iter f l > where f x = [humonguous definition] > > Maybe this problem with Ocamlp4 solvable is? Get this to good effect in vanilla OCaml by copying F# you can: let ( |> ) x f = f x l |> List.iter (fun e -> ...) -- Yoda, Flying Frog Consultancy Ltd. OCaml for Scientists http://www.ffconsultancy.com/products/ocaml_for_scientists/?e