Fix invalid function name

curried() -> curriedSum()
This commit is contained in:
Oleg Legun 2017-06-03 14:02:35 +03:00 committed by GitHub
parent 46bdbde7bd
commit d55932273f

View file

@ -234,13 +234,13 @@ function sum(a, b, c) {
let curriedSum = curry(sum); let curriedSum = curry(sum);
// still callable normally // still callable normally
alert( curried(1, 2, 3) ); // 6 alert( curriedSum(1, 2, 3) ); // 6
// get the partial with curried(1) and call it with 2 other arguments // get the partial with curried(1) and call it with 2 other arguments
alert( curried(1)(2,3) ); // 6 alert( curriedSum(1)(2,3) ); // 6
// full curried form // full curried form
alert( curried(1)(2)(3) ); // 6 alert( curriedSum(1)(2)(3) ); // 6
``` ```
The new `curry` may look complicated, but it's actually pretty easy to understand. The new `curry` may look complicated, but it's actually pretty easy to understand.