Example 1 — One Argument at a Time
Classic unary-style chain until arity is filled.
var abc = function (a, b, c) {
return [a, b, c];
};
var curried = _.curry(abc);
curried(1)(2)(3);
// → [1, 2, 3] How It Works
- Wrap.
_.curry(abc)uses arity3fromabc.length. - First call. Stores
1; returns another function. - Second. Stores
2; still one slot open. - Third. Arity met →
abc(1, 2, 3).

