Skip to content

Commit 0110927

Browse files
committed
fixes
1 parent a6a75f3 commit 0110927

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

1-js/99-js-misc/03-currying-partials/article.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ function sum(a, b) {
3131
return a + b;
3232
}
3333

34-
let carriedSum = curry(sum);
34+
let curriedSum = curry(sum);
3535

36-
alert( carriedSum(1)(2) ); // 3
36+
alert( curriedSum(1)(2) ); // 3
3737
```
3838

3939
As you can see, the implementation is straightforward: it's just two wrappers.
@@ -49,10 +49,10 @@ function sum(a, b) {
4949
return a + b;
5050
}
5151

52-
let carriedSum = _.curry(sum); // using _.carry from lodash library
52+
let curriedSum = _.curry(sum); // using _.curry from lodash library
5353

54-
alert( carriedSum(1, 2) ); // 3, still callable normally
55-
alert( carriedSum(1)(2) ); // 3, called partially
54+
alert( curriedSum(1, 2) ); // 3, still callable normally
55+
alert( curriedSum(1)(2) ); // 3, called partially
5656
```
5757

5858
## Currying? What for?

0 commit comments

Comments
 (0)