Learn about our RFC process, Open RFC meetings & more.Join in the discussion! »

curry

0.0.2 • Public • Published

CURRY

curry function without anything too clever

(... because hunger is the finest spice)

can curry left an right and pass in a context object in one easy call.

var fn = curry([left],function,[right],self)

wrap your curry args in Arrays

calling fn(x) will stick x in between left and right curry ingredients.

left and right are Arrays, and are optional.

i.e.

var fn = curry(funx,[1,2,3])

is the same as

var fn = curry([],funx,[1,2,3])

this makes fn(X) call funx(X,1,2,3)

calling styles:

in all, there are 8 ways to call the function.

curry([left],fn,[right])
curry(fn,[right])
curry([left],fn)
curry(fn)

curry([left],fn,[right],self)
curry(fn,[right],self)
curry([left],fn,self)
curry(fn,self)

full test coverage for documented usuage!

> expresso test/curry.expresso.js

Keywords

none

Install

npm i [email protected]

Version

0.0.2

License

none

Last publish

Collaborators

  • avatar