We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 24fc3ad + f547404 commit 504cf2eCopy full SHA for 504cf2e
README.md
@@ -250,9 +250,14 @@ student("Matt")(8);
250
2) Currying a Sum
251
252
```javascript
253
-let currySum = x => y => x + y;
+let add = x => y => x + y;
254
+
255
+let increment = add(1);
256
+let addFive = add(5);
257
258
+increment(3);
259
+//4
260
-let addFive = currySum(5);
261
addFive(10);
262
// 15
263
```
examples.js
@@ -61,8 +61,9 @@ let currySum =
61
y =>
62
x + y;
63
64
+let incr = currySum(1);
65
let addFive = currySum(5);
-let adding = addFive(10);
66
+let adding = incr(10);
67
console.log(adding); // 15
68
69
let student =
0 commit comments