cloudcmd/modules/currify/README.md
2016-11-14 15:30:59 +02:00

1.3 KiB

Currify License NPM version Dependency Status Build Status

Translate the evaluation of a function that takes multiple arguments into evaluating a sequence of functions, each with a single or more arguments.

Install

npm i currify --save

How to use?

let currify = require('currify');

let mean    = (a, b, c) => (a + b) / c;
let mean1   = currify(mean, 1);
let mean2   = mean1(2);
let result  = mean2(2);

// returns
1.5

License

MIT