Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

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: 2002-05-21 (21:06)
From: YAMAGATA yoriyuki <yoriyuki@m...>
Subject: [Caml-list] Evaluation order of Stream.from
Hi, folks.

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?

The manual states nothing, so maybe I have to assume there is no
guarantee.  But then using a function with side effects
is nearly impossible, which is unfortunate.

I tried to understand the source, but it is full of magic and anyways,
the source does not make any guarantee for the future.
Yamagata Yoriyuki
To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: