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)))
____________________
Racket Users list:
http://lists.racket-lang.org/users