From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id SAA12899; Wed, 3 Jul 2002 18:15:57 +0200 (MET DST) Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id SAA13129 for caml-list@pauillac.inria.fr; Wed, 3 Jul 2002 18:15:56 +0200 (MET DST) Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id LAA06755 for ; Wed, 3 Jul 2002 11:45:36 +0200 (MET DST) Received: from obento.cs.caltech.edu (obento.cs.caltech.edu [131.215.44.101]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id g639jZ918597 for ; Wed, 3 Jul 2002 11:45:35 +0200 (MET DST) Received: from orchestra.cs.caltech.edu (orchestra.cs.caltech.edu [131.215.44.20]) by obento.cs.caltech.edu (Postfix) with ESMTP id BBF3E4036 for ; Wed, 3 Jul 2002 02:45:33 -0700 (PDT) Received: (from mvanier@localhost) by orchestra.cs.caltech.edu (8.11.6/8.9.3) id g639jXd17537; Wed, 3 Jul 2002 02:45:33 -0700 Date: Wed, 3 Jul 2002 02:45:33 -0700 Message-Id: <200207030945.g639jXd17537@orchestra.cs.caltech.edu> X-Authentication-Warning: orchestra.cs.caltech.edu: mvanier set sender to mvanier@cs.caltech.edu using -f From: Michael Vanier To: caml-list@inria.fr Subject: [Caml-list] lazy lists Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk 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 = Nil | 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? Mike ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners