News for hackers. Stuff that matters.
Re:Introducing "Functional JavaScript" by alexfarran on Wednesday March 20, 2013 @11:40AM (#5407901)
You can use a trampoline like the one the author has written in this library https://github.com/fogus/lemonad/blob/master/lib/lemonad.js#...

Basically you rewrite your recursive functions so that instead of calling another function they return a parameterless closure. Then you can iteratively call your first function, and the function it returns, and the function it returns etc until the return value is not a function.

Re:Introducing "Functional JavaScript" by snappy173 on Wednesday March 20, 2013 @12:05PM (#5408102)
or rather than creating an iterator yourself, use setTimeout(..., 0) to put the next call on the event loop.
Re:Introducing "Functional JavaScript" by fogus on Wednesday March 20, 2013 @12:08PM (#5408128)
I talk about that too. :-)