Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] lazy lists
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2002-07-03 (16:15)
From: Michael Vanier <mvanier@c...>
Subject: [Caml-list] lazy lists

What's the best way to write a lazy list data type in ocaml?  I've been
playing around with this datatype (from an old mailing list posting):

type 'a stream =
| Cons of 'a Lazy.t * 'a stream Lazy.t

but I can't figure out how to write a "stream_cons" function.  Also, it
appears that the Lazy.t data type uses references; why is this?

To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: