caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Michael Vanier <mvanier@cs.caltech.edu>
To: caml-list@inria.fr
Subject: [Caml-list] lazy lists
Date: Wed, 3 Jul 2002 02:45:33 -0700	[thread overview]
Message-ID: <200207030945.g639jXd17537@orchestra.cs.caltech.edu> (raw)


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


             reply	other threads:[~2002-07-03 16:15 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-03  9:45 Michael Vanier [this message]
2002-07-03 22:04 ` Remi VANICAT
2005-08-25 23:56 Jonathan Roewen
2005-08-26 10:56 ` Marius Nita
2005-08-26 11:04 ` Richard Jones
2005-08-26 11:16   ` Jun Mukai
2007-05-01 14:10 Yitzhak Mandelbaum
2007-05-01 15:47 ` [Caml-list] " Loup Vaillant
2007-05-01 19:43   ` Jon Harrop
2007-05-02  7:16     ` Nicolas Pouillard
2007-05-02 10:03       ` Loup Vaillant
2007-05-02 10:15         ` Daniel de Rauglaudre

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=200207030945.g639jXd17537@orchestra.cs.caltech.edu \
    --to=mvanier@cs.caltech.edu \
    --cc=caml-list@inria.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;
as well as URLs for NNTP newsgroup(s).