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 AAA16993; Tue, 10 Dec 2002 00:54:09 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id AAA17446 for ; Tue, 10 Dec 2002 00:54:08 +0100 (MET) Received: from mel-rto2.wanadoo.fr (smtp-out-2.wanadoo.fr [193.252.19.254]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id gB9Ns8X17972 for ; Tue, 10 Dec 2002 00:54:08 +0100 (MET) Received: from mel-rta9.wanadoo.fr (193.252.19.69) by mel-rto2.wanadoo.fr (6.7.010) id 3DEF189A002EAB34 for caml-list@inria.fr; Tue, 10 Dec 2002 00:54:08 +0100 Received: from debian (80.8.74.86) by mel-rta9.wanadoo.fr (6.7.010) id 3DF0DEAF0017E9BD for caml-list@inria.fr; Tue, 10 Dec 2002 00:54:08 +0100 Received: from moi by debian with local (Exim 3.36 #1 (Debian)) id 18LXji-00051H-00 for ; Tue, 10 Dec 2002 00:54:54 +0100 To: caml-list@inria.fr Subject: Re: [Caml-list] Streams.from References: <20021209190448.GB24560@farrand.net> <15861.5601.937494.839811@lri.lri.fr> Mail-Copy-To: never From: Remi VANICAT Date: Tue, 10 Dec 2002 00:54:54 +0100 In-Reply-To: <15861.5601.937494.839811@lri.lri.fr> (Jean-Christophe Filliatre's message of "Mon, 9 Dec 2002 23:14:57 +0100") Message-ID: <87n0ne21f5.dlv@wanadoo.fr> User-Agent: Gnus/5.090007 (Oort Gnus v0.07) Emacs/21.2 (i386-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: 8bit Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Jean-Christophe Filliatre writes: > Nick Grey writes: > > > > When a stream is created using Stream.from, is the function f garunteed > > to be called with the stream count parameter 0, 1, 2, ... > > No. For instance, repeated calls to Stream.peek will clearly call f > several times on the same count value (see the code in > stdlib/stream.ml) Stream.peek cache value from parser created by Stream.from. So the answer is that with the current implementation of all the function of the module Stream, f will be call one, and only one time for each count parameter, and in the good order. But this is not written in the specification. -- Rémi Vanicat vanicat@labri.u-bordeaux.fr http://dept-info.labri.u-bordeaux.fr/~vanicat ------------------- 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