Lambda_lib.Interpret
type error =
| UnknownVariable of string
| DivisionByZero
| TypeMismatch
| StepLimitExceeded
Error types for interpreter
type value =
| VInt of int
| VClosure of string * string Ast.t * environment
| VBuiltin of string * value -> (value, error) Base.Result.t
| VUnit
Values in our interpreter
and environment = (string * value) list
val eval_expr : ?max_steps:int -> string Ast.t -> (value, error) Base.Result.t
Evaluate an AST expression with optional step limit