mirror of
https://codeberg.org/uzu/strudel
synced 2026-09-04 06:41:43 -04:00
fix: mondo dont mutate (breaks lambdas)
This commit is contained in:
@@ -343,8 +343,9 @@ export class MondoRunner {
|
||||
return this.evaluate(body, scope);
|
||||
};
|
||||
}
|
||||
// evaluate all children before evaluating list
|
||||
ast.children = ast.children.map((arg) => this.evaluate(arg, scope));
|
||||
return this.evaluator(ast, scope);
|
||||
// evaluate all children before evaluating list (dont mutate!!!)
|
||||
const args = ast.children.map((arg) => this.evaluate(arg, scope));
|
||||
const node = { type: 'list', children: args };
|
||||
return this.evaluator(node, scope);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user