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] Recursive lists
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ 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.


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