I'm dodging the problem because that's what you probably should do. Deep recursion brings a lot of problems in JavaScript - first of all, the stack's depth.
But you don't seem to even need that stack, since you're ready to use setTimeout, discarding the closure's scope: that's actually a clear sign that you should use another approach, probably iterative. That would give you a good performance boost too.
That's why using setTimeout is generally frowned upon: it's a hack to get over a language limitation that could be solved with other, more efficient techniques.
So I don't recommend using setTimeout, because I don't recommend using recursion in the first place. Tail call optimization, where available, could solve the depth problem but it won't yield a performance as good as an iterative approach.
Nice, didn't know that. Kind of reminds me of Lwip (https://github.com/EyalAr/lwip) but it's entirely in JavaScript. I wonder if it keeps up with the speed.
Welcomed by an Application error: "An error occurred in the application and your page could not be served. If you are the application owner, check your logs for details."
What a great start.
It seems to me it's more or less a patchwork of old and future features of JavaScript, including:
- `do` expressions
- pattern matching
- comprehensions
all with some CoffeeScript flavor. Throw in the mix JSX and Flow.
I'm not attracted to that at the moment. Except for JSX, everything else is pretty much in the backlog of EcmaScript.