uncurrify
v2.1.0
Published
uncurry function that was curried before
Downloads
16
Readme
Uncurrify
Takes a function f(x)
that returns another function g(y)
as a result, and yields a new function f′(x, y)
that takes a number of additional parameters and applies them to the function returned by function f
.
Install
npm i uncurrify --save
How to use?
const uncurrify = require('uncurrify');
const g = (x) => (y) => sum(x + y);
const f = (x) => g(x);
const sum = (x, y) => x + y;
ununcurrify(f)(2, 2);
// returns
4;
License
MIT