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
How important are circular lists/recursive objects?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2007-04-03 (06:30)
From: Gleb Alexeyev <gleb.alexeev@g...>
Subject: Re: How important are circular lists/recursive objects?
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?
I do not use Ocaml for anything "real", but I think cyclic 
data-structures are occasionally useful. The first example that springs 
to mind: to implement "let rec" construct in interpreter one would need 
cyclic environment.