From: Remi VANICAT <vanicat@labri.u-bordeaux.fr>
To: caml-list@inria.fr
Subject: Re: [Caml-list] Streams.from
Date: Tue, 10 Dec 2002 00:54:54 +0100 [thread overview]
Message-ID: <87n0ne21f5.dlv@wanadoo.fr> (raw)
In-Reply-To: <15861.5601.937494.839811@lri.lri.fr> (Jean-Christophe Filliatre's message of "Mon, 9 Dec 2002 23:14:57 +0100")
Jean-Christophe Filliatre <Jean-Christophe.Filliatre@lri.fr> 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
next prev parent reply other threads:[~2002-12-09 23:54 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-12-09 19:04 Nick Grey
2002-12-09 22:14 ` Jean-Christophe Filliatre
2002-12-09 23:54 ` Remi VANICAT [this message]
2002-12-10 0:00 ` Nick Grey
2002-12-10 12:29 ` Daniel de Rauglaudre
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87n0ne21f5.dlv@wanadoo.fr \
--to=vanicat@labri.u-bordeaux.fr \
--cc=caml-list@inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox