Skip to content

Commit

Permalink
various chapters: adding in missing crossrefs, per getify#138
Browse files Browse the repository at this point in the history
  • Loading branch information
getify committed Dec 11, 2017
1 parent 9b7bb27 commit f883f55
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion manuscript/apA.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ function isShortEnough(str) {
}
```

In Chapter 3, we used these predicate functions to test a single word. Then in Chapter 9, we learned how to repeat such tests using list operations like `filter(..)`. For example:
In [Chapter 3](ch3.md/#user-content-shortlongenough), we used these predicate functions to test a single word. Then in Chapter 9, we learned how to repeat such tests [using list operations like `filter(..)`](ch9.md/#filter). For example:

```js
var words = [ "You", "have", "written", "something", "very",
Expand Down
4 changes: 2 additions & 2 deletions manuscript/ch11.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ The `formatDecimal(..)` function takes a number (like `2.1`) and calls its `toFi

`formatPrice(..)`, `formatChange(..)`, and `processNewStock(..)` are all compositions with `pipe(..)`, each composing a couple of operations left-to-right (see [Chapter 4](ch4.md)).

For creating our observables (see [Chapter 10](ch10.md/#observables)) from our event emitter, we're going to want a helper that's a curried (see Chapter 3) standalone of RxJS's `Rx.Observable.fromEvent(..)`:
For creating our observables (see [Chapter 10](ch10.md/#observables)) from our event emitter, we're going to want a helper that's a curried (see [Chapter 3](ch3.md/#one-at-a-time)) standalone of RxJS's `Rx.Observable.fromEvent(..)`:

```js
var makeObservableFromEvent =
Expand Down Expand Up @@ -356,7 +356,7 @@ var elemsValsTuples =

The result after this filtering is a list of tuples (like `[ <span>, ".." ]`) ready for DOM content updating, which we assign to `elemsValsTuples`.

**Note:** Since the `updateValueMissing(..)` predicate is specified inline here, we're in control of its signature. Instead of using `spreadArgs(..)` to adapt it to spread out a single array argument as two individual named parameters, we use parameter array-destructuring in the function declaration (`function updateValueMissing([infoChildElem,val]){ ..`); see Chapter 2 for more information.
**Note:** Since the `updateValueMissing(..)` predicate is specified inline here, we're in control of its signature. Instead of using `spreadArgs(..)` to adapt it to spread out a single array argument as two individual named parameters, we use parameter array-destructuring in the function declaration (`function updateValueMissing([infoChildElem,val]){ ..`); see [Chapter 2](ch2.md/#user-content-funcparamdestr) for more information.

Finally, we need to update the DOM content of our `<span>` elements:

Expand Down
2 changes: 1 addition & 1 deletion manuscript/ch5.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ My conclusion: `PI` here is not a violation of the spirit of minimizing/avoiding

In both cases, `PI` and `bar` are not part of the state of the program. They're fixed, non-reassigned references. If they don't change throughout the program, we don't have to worry about tracking them as changing state. As such, they don't harm our readability. And they cannot be the source of bugs related to variables changing in unexpected ways.

**Note:** The use of `const` here does not, in my opinion, make the case that `PI` is absolved as a side cause; `var PI` would lead to the same conclusion. The lack of reassigning `PI` is what matters, not the inability to do so. We'll discuss `const` in Chapter 6.
**Note:** The use of `const` here does not, in my opinion, make the case that `PI` is absolved as a side cause; `var PI` would lead to the same conclusion. The lack of reassigning `PI` is what matters, not the inability to do so. We'll discuss [`const` in Chapter 6](ch6.md/#reassignment).

#### Randomness

Expand Down

0 comments on commit f883f55

Please sign in to comment.