[plt-scheme] eval define

From: Jon Stenerson (jonstenerson at comcast.net)
Date: Thu May 21 15:59:49 EDT 2009

If I start mzscheme and type 

(eval '(define x 3))

it gives a result of 3. If I try something similar in an r6rs library, say
(library (foo)
         (import (rnrs) (rnrs eval))
         (eval '(define x 3) (environment '(rnrs))))

I get "define: not allowed in an expression context in: (define x 3)"

So my question is: in r6rs how do you arrange for runtime decisions about 
definitions (on the basis of the content of a data file for instance)?


Posted on the users mailing list.