From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id LAA12569 for caml-redistribution; Wed, 11 Dec 1996 11:13:47 +0100 (MET) Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id MAA18937 for ; Tue, 10 Dec 1996 12:49:26 +0100 (MET) Received: from pulsar.univ-valenciennes.fr (pulsar.univ-valenciennes.fr [193.50.192.1]) by nez-perce.inria.fr (8.7.6/8.7.1) with ESMTP id MAA15297 for ; Tue, 10 Dec 1996 12:49:24 +0100 (MET) Received: from nestor.univ-valenciennes.fr (nestor.univ-valenciennes.fr [193.50.192.84]) by pulsar.univ-valenciennes.fr (8.7.3/jtpda-5.1) with SMTP id MAA26517 for ; Tue, 10 Dec 1996 12:56:21 +0100 (MET) Message-Id: <199612101156.MAA26517@pulsar.univ-valenciennes.fr> Received: by nestor.univ-valenciennes.fr Tue, 10 Dec 96 12:56:17 +0100 From: Vincent.Poirriez@univ-valenciennes.fr (poirriez) Subject: stream feature To: caml-list@inria.fr Date: Tue, 10 Dec 1996 12:56:16 +0100 (MET) Cc: poirriez@univ-valenciennes.fr (poirriez) X-Mailer: ELM [version 2.4 PL24alpha5] Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: weis Hello every body, (Hope my english is not to bad) I am wondering if it's a bug or a feature: Objective Caml version 1.03 # let s = [<''c';''d'>];; val s : char Stream.t = # let t = [<''a';''b';s;''e'>];; val t : char Stream.t = # Stream.next s;; - : char = 'c' # Stream.iter print_char t;print_newline();; abde - : unit = () # Stream.next t;; Uncaught exception: Parse_failure until this point, no surprise # Stream.next s;; - : char = 'd' But here, I was expecting s to be empty as t. Thus s is not really a sub-stream of t and we can't consider t to contain a copy of s as if the head of s is consumed, it desappears of t to. To resume, I found surprising the following non symetric feature let s appears as a sub stream of t, if s is consumed, it is consumed in t, if t is consumed, it is not consumed in s -- Vincent POIRRIEZ Tel: (33) {0}3 27 14 13 33 Fax: (33) {0}3 27 14 11 50 email: Vincent.Poirriez@univ-valenciennes.fr ISTV Université de Valenciennes Le Mont Houy BP 311 F59304 Valenciennes CEDEX