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.1 required=5.0 tests=AWL autolearn=disabled version=3.1.3 Received: from discorde.inria.fr (discorde.inria.fr [192.93.2.38]) by yquem.inria.fr (Postfix) with ESMTP id D9237BC0A for ; Wed, 4 Apr 2007 22:10:29 +0200 (CEST) Received: from nef2.ens.fr (nef2.ens.fr [129.199.96.40]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l34KATOu018468 for ; Wed, 4 Apr 2007 22:10:29 +0200 Received: from clipper.ens.fr (clipper-gw.ens.fr [129.199.1.22]) by nef2.ens.fr (8.13.6/1.01.28121999) with ESMTP id l34KAS5Q049180 for ; Wed, 4 Apr 2007 22:10:29 +0200 (CEST) X-Envelope-To: Received: from [129.199.158.192] (rezo-158-192 [129.199.158.192]) by clipper.ens.fr (8.13.1/jb-1.1) id l34KASc2014454 for ; Wed, 4 Apr 2007 22:10:28 +0200 (MEST) Subject: Re: [Caml-list] Generators/iterators and lazy evaluation? From: Mathias Kende To: OCaml List In-Reply-To: References: Content-Type: text/plain; charset=UTF-8 Date: Wed, 04 Apr 2007 22:10:09 +0200 Message-Id: <1175717409.31089.19.camel@MATHIAS-ENS> Mime-Version: 1.0 X-Mailer: Evolution 2.8.1 Content-Transfer-Encoding: 8bit X-Virus-Scanned: by amavisd-milter (http://amavis.org/) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-3.1.4 (nef2.ens.fr [129.199.96.32]); Wed, 04 Apr 2007 22:10:29 +0200 (CEST) X-Miltered: at discorde with ID 46140635.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; libref:01 mathias:98 mathias:98 iterators:01 caml-list:01 functions:01 lazy:02 lazy:02 caml:02 module:03 raj:05 docs:06 inria:06 function:08 evaluation:09 Le mercredi 04 avril 2007 à 11:33 -0500, Raj B a écrit : > see right now is breaking this code down into little functions, > saving the current execution environment during the suspend and > keeping track of the right function to call the next time. Are you not just looking for the "lazy" keyword, and the Lazy module ? http://caml.inria.fr/pub/docs/manual-ocaml/libref/Lazy.html Mathias