Evaluates expression in the specified environment and returns its value. Expression must be a syntactically valid Scheme expression represented as a datum value, and environment must be an environment, which can be created using the environment procedure described below.
If the first argument to eval is determined not to be a syntactically correct expression, then eval must raise an exception with condition type &syntax. Specifically, if the first argument to eval is a definition or a splicing begin form containing a definition, it must raise an exception with condition type &syntax.
Import-spec must be a datum representing an <import spec> (see report section on “Library form”). The environment procedure returns an environment corresponding to import-spec.
The bindings of the environment represented by the specifier are immutable: If eval is applied to an expression that is determined to contain an assignment to one of the variables of the environment, then eval must raise an exception with a condition type &syntax.
(eval '(let ((x 3)) x)
'(eval:car (eval:cons 2 4))
'(prefix (only (rnrs) car cdr cons null?)