Expand description
Function evaluation module
This module handles all function-related operations in the interpreter. Provides function definition, calling, closure capture, and parameter binding. Extracted for maintainability and following Toyota Way principles. All functions maintain <10 cyclomatic complexity.
Structs§
- Closure
- Function closure with captured environment
Functions§
- check_
recursion_ depth - Check recursion depth before entering function
- create_
partial_ application - Create a partial application of a function
- decrement_
depth - Decrement recursion depth after exiting function
- eval_
function_ call - Call a function with given arguments
- eval_
function_ composition - Evaluate function composition (f ∘ g)
- eval_
function_ def - Evaluate a function definition and return a closure
- eval_
lambda - Evaluate a lambda expression and return a closure
- eval_
method_ call_ value - Evaluate a method call on a value
- get_
arity - Get arity (number of parameters) of a callable value
- get_
current_ depth - Get current recursion depth (for debugging/monitoring)
- is_
callable - Check if a value is callable (function, builtin, etc.)
- set_
max_ recursion_ depth - Set the maximum recursion depth limit