@nathanfaucett/curry_right

0.0.2 • Public • Published

curryRight

creates function with arguments bound to it

var curryRight = require("@nathanfaucett/curry_right");


function subtract(x, y) {
    return x - y;
}

/*
function subtract_one(y) {
    return subtract(x, 1);
}
*/
var subtract_one = curryRight(subtract, 1);

subtract_one(5); // 4

Package Sidebar

Install

npm i @nathanfaucett/curry_right

Weekly Downloads

1

Version

0.0.2

License

MIT

Last publish

Collaborators

  • nathanfaucett