From: Choun-Tong LIEU <Choun-tong.Lieu@litp.ibp.fr>
To: caml-list@pauillac.inria.fr
Subject: stream
Date: Wed, 28 Feb 1996 10:38:10 +0100 [thread overview]
Message-ID: <199602280938.KAA02520@cadillac.ibp.fr> (raw)
Bonjour,
J'ai une conversation "bizarre" avec caml-light a propos des stream. J'ai
essaye de fouiller dans les docs, je n'ai pas trouve de reponse.
Est ce que caml-light privilegie le dernier element non terminal des stream ?
Voici la conversation :
> Caml Light version 0.61
#let pr flux = do_stream print_int flux;;
pr : int stream -> unit = <fun>
#let toto = [< '1; '2; '3 >];;
toto : int stream = <abstract>
#pr toto;;
123- : unit = ()
#pr toto;;
- : unit = ()
(***** Ok, jusqu'a la, je comprends. do_stream a vide toto.
*****)
#let toto = [< '1; '2; '3 >];;
toto : int stream = <abstract>
#let tata = [< '4; '5 >];;
tata : int stream = <abstract>
#pr [< toto; tata >];;
12345- : unit = ()
#pr toto;;
- : unit = ()
(***** Ok, jusqu'a la, je comprends. do_stream a vide toto. *****)
#pr tata;;
45- : unit = ()
(***** Je comprends un peu moins ou pas du tout. Remarquons tata est a la fin
de [< toto; tata >]
*****)
(***** Ok, on recommence cette fois ci avec un seul.
*****)
#let toto = [< '1; '2; '3 >];;
toto : int stream = <abstract>
#pr [< toto >];;
123- : unit = ()
#pr [< toto >];;
123- : unit = ()
#pr toto;;
123- : unit = ()
(***** La je devine que toto n'est pas vide par do_stream parce que toto est
le dernier dans [< toto >].
*****)
#pr toto;;
- : unit = ()
Merci pour vos reponses. Cordialement votre.
next reply other threads:[~1996-02-28 18:16 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
1996-02-28 9:38 Choun-Tong LIEU [this message]
1996-02-28 18:36 ` stream Michel Mauny
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=199602280938.KAA02520@cadillac.ibp.fr \
--to=choun-tong.lieu@litp.ibp.fr \
--cc=caml-list@pauillac.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