1 var createCurry = require('../internal/createCurry');
3 /** Used to compose bitmasks for wrapper metadata. */
7 * Creates a function that accepts one or more arguments of `func` that when
8 * called either invokes `func` returning its result, if all `func` arguments
9 * have been provided, or returns a function that accepts one or more of the
10 * remaining `func` arguments, and so on. The arity of `func` may be specified
11 * if `func.length` is not sufficient.
13 * The `_.curry.placeholder` value, which defaults to `_` in monolithic builds,
14 * may be used as a placeholder for provided arguments.
16 * **Note:** This method does not set the "length" property of curried functions.
21 * @param {Function} func The function to curry.
22 * @param {number} [arity=func.length] The arity of `func`.
23 * @param- {Object} [guard] Enables use as a callback for functions like `_.map`.
24 * @returns {Function} Returns the new curried function.
27 * var abc = function(a, b, c) {
31 * var curried = _.curry(abc);
42 * // using placeholders
43 * curried(1)(_, 3)(2);
46 var curry = createCurry(CURRY_FLAG);
48 // Assign default placeholders.
49 curry.placeholder = {};
51 module.exports = curry;