I want to use a specific #lang in eval to provide it its semantics. However, eval itself does not appear to have a mechanism to specify the language, and passing in #lang does not seem to work.
Definition of specify transitive verb. 1 : to name or state explicitly or in detail. 2 : to include as an item in a specification.
To explicitly name something or state a particular detail, you specify that thing. So, when you have a craving for dessert and you send someone to the store to buy ice cream, you may want to specify a flavor. If you assign something for a particular purpose, this verb means that you specify.
You can use make-module-evaluator
from racket/sandbox
for that.
> (require racket/sandbox)
> (define evaluator (make-module-evaluator "#lang racket/base"))
> (evaluator '(+ 1 2))
3
> (evaluator "(+ 1 2)")
3
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With