fncompose

1.0.0 • Public • Published

Function composing function Build Status

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

Readme

Keywords

none

Package Sidebar

Install

npm i fncompose

Weekly Downloads

0

Version

1.0.0

License

ISC

Last publish

Collaborators

  • dkunin