gali
v0.0.3
Published
gali is curry
Downloads
5
Readme
gali
partially apply and store like curry
import gali from 'gali';
const fn = gali(function(a) {
return a + 1;
}, function(a, b) {
//a is calculated before
return a + b;
}, function(a, b, c) {
return b + c;
});
//all the same and return a + b + c + 1;
fn(1, 2, 3);
fn(1)(2, 3);
fn(1, 2)(3);
fn(1)(2)(3);
API
gali(fn, [fn...]);
fn can be empty
gali(null, null, function(a, b, c) {
});
//is the same as
curry(function(a, b, c) {
});
//returns a function that accept 3 params and give the last back
gali(null, null, null);