just-curry

0.1.1 • Public • Published

just-curry

Simple curry in javascript

Installation

$ npm install just-curry

Usage

//commonjs
var justCurry = require('just-curry');
//amd
define(['just-curry'], function(justCurry){
  ...
});
//global
var justCurry = window.justCurry;
 
//invocation
function sum(a, b){
  return a + b;
}
var curried = justCurry(sum);
 
var addOne = curried(1);
console.log(addOne(5));//Outputs - 6

Readme

Keywords

none

Package Sidebar

Install

npm i just-curry

Weekly Downloads

2

Version

0.1.1

License

ISC

Last publish

Collaborators

  • subbu963