rmurphey/js-assessment — pull request #17 by Harrison (2012-04-24 23:25:40+00:00)
Title: Add test for currying existing functions

Hey, sweet project.

While fiddling around with the tests, I found myself at the part where I should be willing and able to curry functions.

My initial stab was simply a partially applied function. Which made the tests pass.
Albeit having zero theoretical knowledge about currying functions, I remembered from somewhere that they are not simply partial functions. And that you should be able to do something of the following:

var fn = function ( n1, n2, n3, n4 ) { return n1+n2+n3+n4 };
var curried = curry( fn );
curried( 1 )( 2 )( 3 )( 4 ); // 10
fn( 1, 2, 3, 4 ); // 10