In both #lang racket and #lang scheme, (eval form) by itself apparently runs form in a basically empty namespace. I’ve personally been using the following incantation for evaluating anything in the “standard” namespace:
(define (ueval x)
(define ns (make-base-namespace))
(eval x ns))
Then (ueval source-code) evaluates source-code in a clean namespace with all the normal builtins, including eval.
In both
#lang racket
and#lang scheme
,(eval form)
by itself apparently runsform
in a basically empty namespace. I’ve personally been using the following incantation for evaluating anything in the “standard” namespace:Then
(ueval source-code)
evaluatessource-code
in a clean namespace with all the normal builtins, includingeval
.