6.51 Eval
An evaluator is an interactive evaluation context. Each evaluator has its own set of bindings and, potentially, its own set of module declarations. A Rhombus read-eval-print loop (REPL) is backed by an evaluator, for example.
If as_interaction is true, then seq is evaluated as if in a read-eval-print loop. Depending on the bindings of the current evaluator (as determined by Evaluator.current), that can be different that evaluating non-interaction top-level forms.
A suitable evalutor must have been created and installed as the value of the Evaluator.current context parameter, since the default evaluator is empty.
> parameterize { Evaluator.current: Evaluator.make_rhombus() }:
3
annotation |
function |
function |
function |
fun Evaluator.import(mod :: ModulePath) :: Void |
context parameter |