bloody-curry

1.0.1 • Public • Published

curry

Build Status

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.

license

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.1
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.1
    1
  • 1.0.0
    1
  • 0.2.0
    0
  • 0.1.1
    1
  • 0.1.0
    0

Package Sidebar

Install

npm i bloody-curry

Weekly Downloads

3

Version

1.0.1

License

MIT

Last publish

Collaborators

  • bloodyowl