Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] Evaluation order of Stream.from
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Daniel de Rauglaudre <daniel.de_rauglaudre@i...>
Subject: Re: [Caml-list] Evaluation order of Stream.from
Hi,

On Tue, May 21, 2002 at 10:09:38PM +0900, YAMAGATA yoriyuki wrote:

> I have a question about Stream.from.  If I create a stream by
> Stream.from f by some function f, in what order f is called?  I mean,
> is it guaranteed that f is always called as f 1, f 2, f 3, ....? or is
> the order like f 1, f 3, f 5, f 7, f 2, f 4, .... possible?

Yes, the order is guaranteed: in streams, to access the nth element,
you must have accessed the first n-1 ones before. But the first
element is f 0, not f 1.

-- 
Daniel de RAUGLAUDRE
daniel.de_rauglaudre@inria.fr
http://cristal.inria.fr/~ddr/
-------------------
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