Explain bindbind() function

OK. We have three times the Function.prototype.bind function here, whose (simplified) code function bind(context) { var fn = this; return function() { return fn.apply(context, arguments); } } I will abbreviate in a more functional style with lots of partial application: bindfn(context) -> fncontext. So what does it do? You have got bind.call(bind, bind) or bindbind(bind). … Read more

While or Tail Recursion in F#, what to use when?

The best answer is ‘neither’. 🙂 There’s some ugliness associated with both while loops and tail recursion. While loops require mutability and effects, and though I have nothing against using these in moderation, especially when encapsulated in the context of a local function, you do sometimes feel like you’re cluttering/uglifying your program when you start … Read more