Skip to content

asilinwei/fp-curry

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

fp-curry

Implement curry.

2018-11-23
LinWei

This is about a curry test. When I see
_.curry in lodash, I find that
it is very interesting, so I try to implement it.

Note:
This is only a toy or a test, so can not use in production environment.

Example:

var foo = function(a, b, c, d) {
  return [a, b, c, d];
};

var curried = curry(foo);

curried(1, 2, 3, 4);
// => [1, 2, 3, 4]

curried(1, 2, 3)(4);
// => [1, 2, 3, 4]

curried(1, 2)(3)(4)
// => [1, 2, 3, 4]

curried(1)(2)(3)(4)
// => [1, 2, 3, 4]

About

Implement curry.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published