From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from weis@localhost) by pauillac.inria.fr (8.6.10/8.6.6) id TAA06868 for caml-redistribution; Wed, 28 Feb 1996 19:16:27 +0100 Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.6.10/8.6.6) with ESMTP id KAA28263 for ; Wed, 28 Feb 1996 10:34:52 +0100 Received: from cadillac.ibp.fr (monbazillac.ibp.fr [132.227.82.65]) by concorde.inria.fr (8.7.1/8.7.1) with SMTP id KAA15634 for ; Wed, 28 Feb 1996 10:34:52 +0100 (MET) Received: (from cl@localhost) by cadillac.ibp.fr (8.6.10/8.6.10) id KAA02520 for caml-list@pauillac.inria.fr; Wed, 28 Feb 1996 10:38:10 +0100 Date: Wed, 28 Feb 1996 10:38:10 +0100 From: Choun-Tong LIEU Message-Id: <199602280938.KAA02520@cadillac.ibp.fr> To: caml-list@pauillac.inria.fr Subject: stream Sender: weis 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 = #let toto = [< '1; '2; '3 >];; toto : int stream = #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 = #let tata = [< '4; '5 >];; tata : int stream = #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 = #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.