[racket] Reading graph structure

From: Harry Spier (harryspier at hotmail.com)
Date: Thu Aug 18 10:21:06 EDT 2011

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

> In these areas, read-syntax takes over. Enter 
> 
>  (read) 
> 
> at the prompt. Type 
>   
>   #0=(1 . #0#)
> 
> into the input box that appears. 
>

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

Thanks,
Harry Spier

> Subject: Re: [racket] Reading graph structure
> From: matthias at ccs.neu.edu
> Date: Thu, 18 Aug 2011 09:25:06 -0400
> CC: users at racket-lang.org
> To: harryspier at hotmail.com
> 
> 
> On Aug 18, 2011, at 9:09 AM, Harry Spier wrote:
> 
> > When I put (#1=100 #1# #1#) in either the definitions or interactions window  I get 
> > 
> > . read: #..= expressions not allowed in read-syntax mode
> 
> 
> In these areas, read-syntax takes over. Enter 
> 
>  (read) 
> 
> at the prompt. Type 
>   
>   #0=(1 . #0#)
> 
> into the input box that appears. 
> 
> 
> 
> > Also I'm not clear how #0=(1 . #0#)  converts to 
> > (let ([v (cons 1 #f)])  
> >      (set-cdr! v v) v)
> 
> 
> That is indeed a strange thing considering that set-cdr! is no longer a part of the language :-) 
> 
> 
> -- Matthias
> 
> 
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20110818/b6848a32/attachment.html>

Posted on the users mailing list.