33 ms·
I could be wrong, but I think your mutualRecursion() function is a multi-parameter version of the Y combinator, which is the classic way of introducing recursio
by munificent 9y ago
I could be wrong, but I think your mutualRecursion() function is a multi-parameter version of the Y combinator, which is the classic way of introducing recursion to a language that doesn't natively support it. If so then, yes, that works.
- clusmore 9y ago> but I think your mutualRecursion() function is a multi-parameter version of the Y combinator Yes, exactly. I've created a fork [1] where I replace the multiple-parameter Y combinator with a single-parameter kind that operates on what is effectively a vtable. [1] https://jsfiddle.net/9ump7bt5/1/ https://jsfiddle.net/9ump7bt5/1/