From: Ville-Pertti Keinonen <will@exomi.com>
To: Brian Hurt <bhurt@spnz.org>
Cc: caml-list <caml-list@inria.fr>
Subject: Re: [Caml-list] How important are circular lists/recursive objects?
Date: Tue, 3 Apr 2007 09:58:59 +0300 [thread overview]
Message-ID: <B1204BE5-F763-44E5-8644-7A390DBB602D@exomi.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0704021949590.5725@localhost>
On Apr 3, 2007, at 2:55 AM, Brian Hurt wrote:
> The question is: if this behavior was completely outlawed, and
> either you couldn't build up circular lists/recursive data
> structures of this type at all, or had to call special functions
> (List.circularize, say), to create them, would this be a
> signifigant problem? Does anyone actually use this construct, and
> if so, for what?
Are you referring to all cases of let rec for non-functions, or just
those that include "bare" self-references? Most of the cases I can
think of involve closures (so they're not necessarily cyclic, merely
self-referential), e.g. useful lazy lists can often be constructed
with something like:
let rec l = LazyList (1, lazy (do_something l))
next prev parent reply other threads:[~2007-04-03 6:58 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-02 23:55 Brian Hurt
2007-04-03 6:24 ` Gleb Alexeyev
2007-04-03 6:58 ` Ville-Pertti Keinonen [this message]
2007-04-03 7:00 ` [Caml-list] " Andrej Bauer
2007-04-03 12:09 ` Jon Harrop
2007-04-03 13:31 ` Bruno De Fraine
2007-04-04 23:28 ` Brian Hurt
2007-04-05 0:51 ` Jon Harrop
2007-04-03 12:49 ` Philippe Wang
2007-04-04 3:52 ` Stefan Monnier
2007-04-04 5:28 ` [Caml-list] " skaller
2007-10-04 17:48 ` Fabrice Marchant
2007-10-04 20:39 ` skaller
2007-10-04 21:36 ` rossberg
2007-10-04 22:25 ` skaller
2007-10-05 10:42 ` Dominique Martinet
2007-10-08 9:57 ` Andreas Rossberg
2007-04-04 8:45 ` Don Syme
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=B1204BE5-F763-44E5-8644-7A390DBB602D@exomi.com \
--to=will@exomi.com \
--cc=bhurt@spnz.org \
--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