From: Jon Stenerson (jonstenerson at comcast.net) Date: Sat Mar 1 05:50:52 EST 2014 |
|
When I put the following in the DrRacket definitions window and then evaluate t, it works for a few seconds and runs out of memory. Anyone understand the problem? #lang racket (define (Print stx port mode) (if (Atom? stx) (write-string "ATOM " port) (Print (Pair-cdr stx) port mode))) (struct Base () #:methods gen:custom-write [(define write-proc Print)]) (struct Atom Base (datum)) (struct Pair Base (car cdr)) (define t (struct-copy Base (Atom 3)))
Posted on the users mailing list. |
|