mondo: flip pipe order: now pining to the end of the function...

This commit is contained in:
Felix Roos 2025-03-21 23:50:14 +01:00
parent 5d4ef46ac7
commit f71db4aeed
No known key found for this signature in database
3 changed files with 34 additions and 66 deletions

View file

@ -43,11 +43,6 @@ let runner = new MondoRunner({
if (!fn) {
throw new Error(`[moundough]: unknown function "${name}"`);
}
if (!['square', 'angle', 'stack', 'curly'].includes(name)) {
// flip args (pat to end)
const [pat, ...rest] = args;
args = [...rest, pat];
}
return fn(...args);
},
leaf(token, scope) {