_.curry()
_.curry(func, [arity=func.length])
Creates a function that accepts arguments of func and either invokes func returning its result, if at least arity number of arguments have been provided, or returns a function that accepts the remaining func arguments, and so on. The arity of func may be specified if func.length is not sufficient.
The _.curry.placeholder value, which defaults to _ in monolithic builds, may be used as a placeholder for provided arguments.
Note: This method doesn't set the "length" property of curried functions.
Arguments
func (Function)
: The function to curry.
[arity=func.length] (number)
: The arity of func.
Returns
(Function)
: Returns the new curried function.