[racket] Cyclic data structures in Typed Racket

From: Konrad Hinsen (konrad.hinsen at fastmail.net)
Date: Tue Sep 30 07:12:19 EDT 2014

Sam Tobin-Hochstadt writes:

 > Ah, if you want to create truly cyclic structure with no base case
 > like this, then you'll have to do more work. Either you'll need to
 > expand the type of the `x` field in `foo` to allow an initial value,
 > or you'll need to create a dummy `foo` with that extended type, and
 > then copy the cyclic data once you've created it to a new version

In my specific application, I ended up replacing the cyclic data
structure, which was a singleton, by a function that simulates it.
But for another project, which involves graphs, I'll stick to
untyped Racket for now.

Konrad.

Posted on the users mailing list.