Simplified currying.

^
This commit is contained in:
hemanth.hm 2015-06-03 16:21:27 +05:30
parent 8235cd9832
commit ee026cd4da

View file

@ -52,11 +52,7 @@ partial(2); //=> 42
```js ```js
let sum = (a,b) => a+b; let sum = (a,b) => a+b;
let curriedSum = function(a) { let curriedSum = (a) => (b) => a + b;
return function(b) {
return a + b;
};
};
curriedSum(40)(2) // 42. curriedSum(40)(2) // 42.
``` ```