Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typo chapter 3 #213

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions manuscript/ch3.md
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ function add(x,y) {
}
```

Now imagine we'd like take a list of numbers and add a certain number to each of them. We'll use the `map(..)` utility (see [Chapter 9, "Map"](ch9.md/#map)) built into JS arrays:
Now imagine we'd like to take a list of numbers and add a certain number to each of them. We'll use the `map(..)` utility (see [Chapter 9, "Map"](ch9.md/#map)) built into JS arrays:

```js
[1,2,3,4,5].map( function adder(val){
Expand Down Expand Up @@ -666,7 +666,7 @@ When trying to decipher curried functions, I've found it helps me tremendously i
In fact, to reinforce that point, let's consider the same code but written with ES6 arrow functions:

```js
curriedSum =
var curriedSum =
v1 =>
v2 =>
v3 =>
Expand All @@ -678,7 +678,7 @@ curriedSum =
And now, all on one line:

```js
curriedSum = v1 => v2 => v3 => v4 => v5 => sum( v1, v2, v3, v4, v5 );
var curriedSum = v1 => v2 => v3 => v4 => v5 => sum( v1, v2, v3, v4, v5 );
```

Depending on your perspective, that form of visualizing the curried function may be more or less helpful to you. For me, it's a fair bit more obscured.
Expand Down