caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* Streams and call-by-need
@ 2006-05-26 14:52 Christoph Bauer
  2006-05-26 15:17 ` [Caml-list] " Nicolas Pouillard
  0 siblings, 1 reply; 2+ messages in thread
From: Christoph Bauer @ 2006-05-26 14:52 UTC (permalink / raw)
  To: caml-list

Hi,

do streams support call-by-need? This looks like call-by-name:

#  let s = [< '(print_endline "a"); '(print_endline "b") >]
  ;;
val s : unit Stream.t = <abstr>
# let t = [< s; s >]
  ;;
val t : unit Stream.t = <abstr>
# Stream.next t;;
a
- : unit = ()
# Stream.next t;;
b
- : unit = ()
# Stream.next t;;
a
- : unit = ()
# Stream.next t;;
b
- : unit = ()

Christoph Bauer


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-05-26 15:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-05-26 14:52 Streams and call-by-need Christoph Bauer
2006-05-26 15:17 ` [Caml-list] " Nicolas Pouillard

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).