bloody-curry
v1.0.1
Published
simple currying
Downloads
8
Readme
curry
install
$ npm install bloody-curry
require
var curry = require("curry")
simple currying script
function add(a,b,c,d){
return a + b + c + d
}
var addToOne = curry(add)(1)
addToOne(1,2,3) // -> 7
addToOne(1)(2)(3) // -> 7
api
curry(func[, length])
Returns a curried function that keeps returning a function until the sum of
the passed arguments's length reaches length
(if defined) or fn.length
.