diff --git a/1-js/06-advanced-functions/11-currying-partials/1-ask-currying/task.md b/1-js/06-advanced-functions/11-currying-partials/1-ask-currying/task.md index 915d8aee..f8b83d7a 100644 --- a/1-js/06-advanced-functions/11-currying-partials/1-ask-currying/task.md +++ b/1-js/06-advanced-functions/11-currying-partials/1-ask-currying/task.md @@ -8,7 +8,7 @@ The task is a little more complex variant of . The `user` object was modified. Now instead of two functions `loginOk/loginFail`, it has a single function `user.login(true/false)`. -What to pass `askPassword` in the code below, so that it calls `user.login(true)` as `ok` and `user.login(fail)` as `fail`? +What to pass `askPassword` in the code below, so that it calls `user.login(true)` as `ok` and `user.login(false)` as `fail`? ```js function askPassword(ok, fail) { diff --git a/1-js/06-advanced-functions/11-currying-partials/article.md b/1-js/06-advanced-functions/11-currying-partials/article.md index d14dbffc..717dccf4 100644 --- a/1-js/06-advanced-functions/11-currying-partials/article.md +++ b/1-js/06-advanced-functions/11-currying-partials/article.md @@ -5,7 +5,7 @@ libs: # Currying and partials -Till now we were only talking about binding `this`. Now let's make a step further. +Until now we have only been talking about binding `this`. Let's take it a step further. We can bind not only `this`, but also arguments. That's rarely done, but sometimes can be handy. @@ -146,7 +146,7 @@ More advanced implementations of currying like [_.curry](https://lodash.com/docs ```js function curry(f) { - return function(..args) { + return function(...args) { // if args.length == f.length (as many arguments as f has), // then pass the call to f // otherwise return a partial function that fixes args as first arguments