From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id OAA16987; Thu, 29 Apr 2004 14:31:48 +0200 (MET DST) Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id OAA16961 for ; Thu, 29 Apr 2004 14:31:47 +0200 (MET DST) Received: from eris.rz.uni-saarland.de (eris.rz.uni-saarland.de [134.96.7.8]) by nez-perce.inria.fr (8.12.10/8.12.10) with ESMTP id i3TCVkjq011184 for ; Thu, 29 Apr 2004 14:31:46 +0200 Received: from cs.uni-sb.de (cs.uni-sb.de [134.96.254.254]) by eris.rz.uni-saarland.de (8.12.10/8.12.10) with ESMTP id i3TCTeRf31856837 for ; Thu, 29 Apr 2004 14:31:45 +0200 (CST) Received: from mail.cs.uni-sb.de (mail.cs.uni-sb.de [134.96.254.200]) by cs.uni-sb.de (8.12.11/2003091100) with ESMTP id i3TBv2dL009033 for ; Thu, 29 Apr 2004 13:57:02 +0200 (CEST) Received: from ps.uni-sb.de (grizzly.ps.uni-sb.de [134.96.186.68]) by mail.cs.uni-sb.de (8.12.11/2004041400) with ESMTP id i3TBv1oW019947 for ; Thu, 29 Apr 2004 13:57:01 +0200 (CEST) X-Authentication-Warning: email: Host grizzly.ps.uni-sb.de [134.96.186.68] claimed to be ps.uni-sb.de Received: from ps.uni-sb.de (groove.ps.uni-sb.de [134.96.186.172]) by ps.uni-sb.de (8.12.10/8.12.10) with ESMTP id i3TBv0dQ018504; Thu, 29 Apr 2004 13:57:00 +0200 Message-ID: <4090ED8C.7080909@ps.uni-sb.de> Date: Thu, 29 Apr 2004 13:57:00 +0200 From: Andreas Rossberg User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.1) Gecko/20031114 X-Accept-Language: en-us, en MIME-Version: 1.0 To: caml-list Subject: Re: [Caml-list] [ANN] The Missing Library References: <200404280613.19547.jdh30@cam.ac.uk> <1083141467.9537.845.camel@pelican.wigram> <200404281018.14913.jdh30@cam.ac.uk> <1083151482.9537.904.camel@pelican.wigram> <20040428151818.GC1310@excelhustler.com> <1083169714.9537.1102.camel@pelican.wigram> <20040428180243.GA4404@excelhustler.com> <1083200049.9537.1189.camel@pelican.wigram> In-Reply-To: <1083200049.9537.1189.camel@pelican.wigram> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-AntiVirus: checked by AntiVir Milter 1.0.6; AVE 6.25.0.2; VDF 6.25.0.38 X-Miltered: at nez-perce by Joe's j-chkmail ("http://j-chkmail.ensmp.fr")! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; rossberg:01 rossberg:01 uni-sb:01 caml-list:01 inverted:01 implemented:01 threading:01 bug:01 uni-sb:01 variant:02 wrote:03 library:03 iter:03 iter:03 cheers:06 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk skaller wrote: > > Indeed. If I may be so bold to observe .. you've control > inverted. You're now driving the iteration. You've > got rid of the HOF List.iter and implemented your own > special one. No, he has not. He is using fold to drive the iteration, which is just a more general variant of iter, that allows (1) threading some additional state and (2) incrementally constructing a result, although John's code is only making use of (1). > The point of the code I displayed was that it > control inverts *without* getting rid of the > driver loop. I'm not sure I understand. > Also .. a small bug in your translation: it prints "[]" > for an empty list. The original prints "". No, John's version does the same. Cheers, - Andreas -- Andreas Rossberg, rossberg@ps.uni-sb.de Let's get rid of those possible thingies! -- TB ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners