Closure
class Closure
Lambda (anonymous) function object with captured environment
Closures implement first-class functions in WAL: - Capture a lexical environment at definition time - Store parameter list (args) - Store function body (expression) - Support recursive self-reference via name
Evaluation: - Parameters bound to arguments in captured environment - Body evaluated with new bindings - Returns the body's evaluation result
- See
- Environment for scope chains
- See
- SEval::eval_closure