[racket] shared and immutable structures

From: David Van Horn (dvanhorn at ccs.neu.edu)
Date: Tue Feb 1 10:14:57 EST 2011

 > (shared ([a (cons 1 a)])
     a)
#0='(1 . #0#)

 > (struct kons (first rest) #:transparent)
 > (shared ([a (kons 1 a)])
     a)
(kons 1 #<undefined>)

Is there a way to get the kons structure to behave like cons?

Thanks,
David


Posted on the users mailing list.