mondo: remember pair locations

+ allow passing a scope to MondoRunner.run
+ make def a side effect
+ proper lambda with multiple args + closure
This commit is contained in:
Felix Roos 2025-04-01 21:49:28 +02:00
parent f2372e7a41
commit 94a3a60e49
No known key found for this signature in database
3 changed files with 38 additions and 31 deletions

View file

@ -27,7 +27,7 @@ function evaluator(node) {
// children in a list will already be evaluated
// the first child is expected to be a function
if (typeof fn !== 'function') {
throw new Error(`"${fn}" is not a function ${typeof fn}`);
throw new Error(`"${fn}" is not a function`);
}
return fn(...args);
}