Great write up, very informative and I appreciate the simple, yet not so simple example to really drive home currying.
Just one correction/typo, I believe your currySimple function should be returning itself in the last statement rather than return curry(fn, ...all) - which I'm assuming came from your advanced example.
Great write up, very informative and I appreciate the simple, yet not so simple example to really drive home currying.
Just one correction/typo, I believe your
currySimple
function should be returning itself in the last statement rather thanreturn curry(fn, ...all)
- which I'm assuming came from your advanced example.Thanks for the spot - I renamed the function (which I'd called curry when I wrote it) and not the recursion! :)