Browse thread
[Caml-list] Recursive lists
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | David Brown <caml-list@d...> |
| Subject: | Re: [Caml-list] Recursive lists |
On Fri, Oct 08, 2004 at 04:42:44PM +0200, Alex Baretta wrote: > Keith Wansbrough wrote: > > > >How could they do this? It's just a list; there's nothing special > >about it, except that it has no end. > > Lists can be recursive. This means that the list type models a set of > values which includes the cyclic lists. The ocaml type system allow both > for such values and for functions manipulating them, so it's perfectly > natural to expect the List module to treat cyclic lists correctly. > Besides, the cyclicity of a list is a perfectly decidable property by > virtue of the pumping lemma. I doubt that most users of list operations want the extra overhead needed to check for cycles. Recursive lists are fairly rare in strict languages. Dave ------------------- 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