fncompose
v1.0.0
Published
Function composing function
Downloads
3
Readme
Function composing function
Generated from ramda, so it's curried and accepts curried functions
Install
npm install fncompose -S
Usage
var fncompose = require('fncompose').compose;
var fcurry = require('fncompose').curry;
var addCur = fcurry(function(x,y){ return x + y;});
var multiplyCur = fcurry(function(x,y){ return x * y;});
var add5 = addCur(5);
var multiply2 = multiplyCur(2);
var add2AndMultiply = fncompose(multiply2, add5);
add2AndMultiply(2); // 14
add2AndMultiply(10); // 30
License
MIT © Dmitri Kunin