[<<][plt][>>][..]
Sat May 2 23:15:35 CEST 2009

Immutable cyclic structures

self-refence with immutable structures is only possible with
lazyness. however, PLT scheme contains the 'shared form, much like
'let but for data structure bindings.

as long as references are guarded by list/struct constructors, this
form can create cyclic structures.

(shared ((ones (cons 1 ones))) ones)

This works with the (immutable) native data types and mutable structs.




[Reply][About]
[<<][plt][>>][..]