Yeah, the example couldn't work. Also, isn't this an example of partial application, not currying?
Re:Curry flavored promises
by ephemeralgomi on Sunday April 27, 2014 @10:53PM
(#7658001)
Yup.
Funny this mistake rarely goes the other direction. Probably because 'curry' is a fin word.
I propose 'parry' for "partial application", to satisfy the punsters without compromising accuracy.
this
console.log.bind(console)
doesn't work in old IE you need to do Function.prototype.bind.call(console.log, console)well, it depends on the console.log implementation :)
On firefox I get
>>> console.log.call(undefined, "Hi")
Hi
Re:Curry flavored promises
by bendrucker on Monday April 28, 2014 @08:06AM
(#7659377)
console.log is bound in Firefox and in Node. In all other browsers calling console.log.call(null) is a TypeError.
You need to do this:
Or this: