This commit is contained in:
Ilya Kantor 2017-06-03 17:26:31 +03:00
commit 048a896d78
2 changed files with 4 additions and 4 deletions

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.

View file

@ -1,6 +1,6 @@
# The JavaScript language # The JavaScript language
Here we learn JavaScript, starting from the scratch and to advanced concepts like OOP. Here we learn JavaScript, starting from scratch and go on to advanced concepts like OOP.
We concentrate on the language itself here, with the minimum of environment-specific notes. We concentrate on the language itself here, with the minimum of environment-specific notes.