Skip to content
This repository was archived by the owner on Jan 13, 2022. It is now read-only.
oatkiller edited this page Sep 13, 2010 · 2 revisions

return a function that does the same as the original but with some arguments baked in.

(function () {

// a function that takes two parameters and returns the sum of them.
var add = function (a,b) {
	return a + b;
};

// a function that takes 1 parameter and returns it summed with 4
var add4 = add[o.curry](4);

add(1,2); // returns 3
add4(1); // returns 5

});
Clone this wiki locally