Skip to content

Instantly share code, notes, and snippets.

@jsantell
Created November 21, 2012 21:08
Show Gist options
  • Save jsantell/4127735 to your computer and use it in GitHub Desktop.
Save jsantell/4127735 to your computer and use it in GitHub Desktop.
currying
var curry = require( 'curry' );
var newFn = curry( [1,2,3], fn );
newFn( 4 );
function fn () {
Array.prototype.slice.call( arguments ).forEach(function (x) {
console.log( x );
});
// outputs 1, 2, 3, 4
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment