Skip to content

ForbesLindesay-Unmaintained/curry

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jepso-ci status

curry

Curry a function in JavaScript

Installation

$ component install ForbesLindesay/curry

API

var curry = require('curry');

var sumFour = curry(function (a, b, c, d) {
  return a + b + c + d;
});

sumFour(5)(5)(5)(5);// => 20
sumFour(5, 5)(5, 5);// => 20
sumFour(5, 5, 5, 5);// => 20
sumFour(5)(5, 5, 5);// => 20
sumFour(5, 5, 5)(5);// => 20

License

MIT

viewcount

About

Curry a function in JavaScript

Resources

Stars

Watchers

Forks

Packages

No packages published