Message from JavaScript discussions

May 2017

— I see, the algorithm part of wikipedia article is very clear


The wikipedia one is not stack safe and its not what I coded, but its close. I used metacomposition instead of recursion

— Same behavior

— Yeah, I saw

— But still, illustrates the point very clearly

— So I made a mistake typing this haha

— I havent slept for 2 weeks due to taking care of a 8 week old puppy

— Oh god

— So the main algorithm uses iterator protocol, but you can also use the Strategy interface which behaves just like an ioc callback

Message permanent page

— `var alg =
new Strategy(onFirst, onAll);
var result =;

— Ooh

— How many of you use vim?