instant-curry

1.2.0 • Public • Published

Instant Curry

Lightweight Function Currying

import curry from 'instant-curry';

let lazyAdd = curry( (a, b, c, d) => a+b+c+d );


lazyAdd(1, 2, 3, 4); // 10
lazyAdd(1, 2, 3)(4); // 10
lazyAdd(1, 2)(3, 4); // 10
lazyAdd(1)(2)(3)(4); // 10

Package Sidebar

Install

npm i instant-curry

Weekly Downloads

5

Version

1.2.0

License

MIT

Last publish

Collaborators

  • tuxsudo