Continuation-passing style in JavaScript (2010)
matt.might.net
matt.might.net
"node.js is a high-performance, server-side platform for JavaScript in which blocking procedures are banned."
Most of this sentence is correct, excpet for the final part. Blocking procedures are, in fact, permitted. They are simply discouraged.
For pedagogy Fibonacci and Factorial are used so often because they're easily defined, often already understood by most with high school algebra under their belt, and pretty much the archetypical recurrence relations. Not a bad place to start exploring recursion.
If you want people to move on, you're probably going to need to provide a better starting place for pedagogical purposes.
There are a lot of reasons why different programming communities don't listen to each other, and I find the fibonacci example to be a "bad smell".
By the way, there are plenty of reasons not to use the closed form.
Sometimes, if you want an example to be both small and instructive, you'll have to put up with some contrivances.
http://wingolog.org/archives/2009/02/25/callcc-and-ecmascrip...