Skip to content

Commit 228873c

Browse files
authored
Merge pull request javascript-tutorial#382 from brentguf/currying
Currying/Partials chapter
2 parents 9cae9d3 + 7bad527 commit 228873c

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

1-js/06-advanced-functions/11-currying-partials/1-ask-currying/task.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ The task is a little more complex variant of <info:task/question-use-bind>.
88

99
The `user` object was modified. Now instead of two functions `loginOk/loginFail`, it has a single function `user.login(true/false)`.
1010

11-
What to pass `askPassword` in the code below, so that it calls `user.login(true)` as `ok` and `user.login(fail)` as `fail`?
11+
What to pass `askPassword` in the code below, so that it calls `user.login(true)` as `ok` and `user.login(false)` as `fail`?
1212

1313
```js
1414
function askPassword(ok, fail) {

1-js/06-advanced-functions/11-currying-partials/article.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ libs:
55

66
# Currying and partials
77

8-
Till now we were only talking about binding `this`. Now let's make a step further.
8+
Until now we have only been talking about binding `this`. Let's take it a step further.
99

1010
We can bind not only `this`, but also arguments. That's rarely done, but sometimes can be handy.
1111

@@ -146,7 +146,7 @@ More advanced implementations of currying like [_.curry](https://lodash.com/docs
146146

147147
```js
148148
function curry(f) {
149-
return function(..args) {
149+
return function(...args) {
150150
// if args.length == f.length (as many arguments as f has),
151151
// then pass the call to f
152152
// otherwise return a partial function that fixes args as first arguments

0 commit comments

Comments
 (0)