[racket] Reading graph structure

From: Hendrik Boom (hendrik at topoi.pooq.com)
Date: Thu Aug 18 11:52:17 EDT 2011

On Thu, Aug 18, 2011 at 10:21:06AM -0400, Harry Spier wrote:
> 
> I've done that and what displays is:
> #0=(1  . #0#)
> #0='(1 . #0#)
> 
> Again I'm not clear why this doesn't try to produce an endlessly 
> recurring (1 . (1 . ( 1 .......  list

It does.  But the racket implementers probably realized that there is't 
enough room on your disk to store that printout, so they detected the 
cycle and showed you that instead.

Just as you used "......." in your email rather than send an infinite 
message.

-- hendrik

> > That is indeed a strange thing considering that set-cdr! is no longer a part of the language :-) 

Indeed, I wonder how the racket read function constructs the cyclic list 
without using set-cdr!.

-- hendrik


Posted on the users mailing list.