* stream feature
@ 1996-12-10 11:56 poirriez
0 siblings, 0 replies; only message in thread
From: poirriez @ 1996-12-10 11:56 UTC (permalink / raw)
To: caml-list; +Cc: poirriez
[-- 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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~1996-12-11 10:13 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-12-10 11:56 stream feature poirriez
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).