On Thu, Jun 9, 2011 at 8:34 AM, Marijn <hk...@gentoo.org> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Thanks Matthias,
>
> On 06/09/11 16:34, Matthias Felleisen wrote:
>>
>> (1) To create cyclic structs you need mutability in our world. [gensym is 0 
>> assignments, cyclic structs is 1 assignment, and state is N assignments.]
>>
>> (2) I think the failure should come earlier when a struct isn't mutable. If 
>> you agree, you can try to request a feature change.
>
> I agree and would be happy if this behavior was changed.
>
> So any idea as to why my custom-write doesn't work correctly? AFAICT the
> code should work, so either I screwed up or misunderstood something or
> this is a bug.

You aren't printing to the provided port, but to stdout.  The printer
is called multiple times to detect cycles, leading to the behavior you
see. Providing `p' as the  port argument to `write' or `display'
should fix the problem.
-- 
sam th
sa...@ccs.neu.edu
_________________________________________________
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/users

Reply via email to