[racket] Trace rejects set!
Thanks, Vincent.
I didn't know traces had to be in the program itself.
Michael
________________________________
From: Vincent St-Amour <stamourv at ccs.neu.edu>
To: michael rice <nowgate at yahoo.com>
Cc: Vincent St-Amour <stamourv at ccs.neu.edu>; Racket Users <users at racket-lang.org>
Sent: Monday, October 10, 2011 1:49 PM
Subject: Re: [racket] Trace rejects set!
At Mon, 10 Oct 2011 10:31:39 -0700 (PDT),
michael rice wrote:
>
> Welcome to DrRacket, version 5.1.3 [3m].
> Language: racket; memory limit: 128 MB.
> > (trace next-leaf-generator)
> set!: cannot modify a constant: next-leaf-generator
Try adding `(trace next-leaf-generator)' to the program itself, that
should work.
The interactions window is not part of the program, which is in its
own module. Since you can't mutate variables except in the module
where they're defined, you can't add tracing from the interactions
window.
Vincent
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20111010/35308448/attachment.html>