eval -- r7rs Definition procedure;
Procedure variants:
((eval-expression eval-environment) -> (any))
eval-expression;eval-environment;any;scheme:eval -- (scheme eval);scheme -- (scheme);(eval expr-or-def environment-specifier)If
expr-or-defis an expression, it is evaluated in the specified environment and its values are returned. If it is a definition, the specified identifier(s) are defined in the specified environment, provided the environment is not immutable. Implementations may extendevalto allow other objects.(eval '(* 7 3) (environment '(scheme base))) ===> 21 (let ((f (eval '(lambda (f x) (f x x)) (null-environment 5)))) (f + 10)) ===> 20 (eval '(define foo 32) (environment '(scheme base))) ===> #error
The text herein was sourced and adapted as described in the "R7RS attribution of various text snippets" appendix.