Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Vincent.Poirriez@univ-valenciennes.fr (poirriez)
To: caml-list@inria.fr
Cc: poirriez@univ-valenciennes.fr (poirriez)
Subject: stream feature
Date: Tue, 10 Dec 1996 12:56:16 +0100 (MET)	[thread overview]
Message-ID: <199612101156.MAA26517@pulsar.univ-valenciennes.fr> (raw)

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=US-ASCII, Size: 1068 bytes --]

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 = <abstr>
# let t = [<''a';''b';s;''e'>];;
val t : char Stream.t = <abstr>
# 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





                 reply	other threads:[~1996-12-11 10:13 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=199612101156.MAA26517@pulsar.univ-valenciennes.fr \
    --to=vincent.poirriez@univ-valenciennes.fr \
    --cc=caml-list@inria.fr \
    --cc=poirriez@univ-valenciennes.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