This site is a static rendering of the Trac instance that was used by R7RS-WG1 for its work on R7RS-small (PDF), which was ratified in 2013. For more information, see Home. For a version of this page that may be more recent, see EvalDefine in WG2's repo for R7RS-large.

Eval­Define

cowan
2013-05-24 13:04:32
3history
source

Passing a definition to eval may or may not work according to R5RS. Furthermore, in many Schemes, but not in R5RS, it's possible to call eval with just one argument, implying the interaction environment. I tested the suite of Schemes to determine whether and how it's possible to add definitions to the interaction environment by evaluating the following four forms at the REPL:

(eval '(define x 32) (interaction-environment)) x (eval '(define y 55)) y

The following Schemes allow definition by eval:

The following Schemes do not allow definition by eval: