Skip to content

Commit ac81c0d

Browse files
committed
leanpub: more tweaks for layout in ch9
1 parent 411fc4a commit ac81c0d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

manuscript/ch9.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1070,7 +1070,7 @@ The result of this mapping is an array of functions that are ready to compose (a
10701070
)
10711071
```
10721072

1073-
Next, observe that `getSessionId(..)` and `getUserId(..)` can be expressed as a mapping from the respective values `"sessId"` and `"uId"`:
1073+
Next, let's observe that `getSessionId(..)` and `getUserId(..)` can be expressed as a mapping from the respective values `"sessId"` and `"uId"`:
10741074

10751075
```js
10761076
[ "sessId", "uId" ].map( propName => partial( prop, propName ) )
@@ -1086,7 +1086,7 @@ var mergeReducer =
10861086
(merged.splice( idx * 2, 0, v ), merged);
10871087
```
10881088

1089-
We can use `reduce(..)` (our Swiss Army knife, remember!?) to "insert" `lookupUser(..)` in the array between the generated `getSessionId(..)` and `getUserId(..)` functions, by merging two lists:
1089+
We can use `reduce(..)` (our Swiss Army knife, remember!?) to "insert" `lookupUser(..)` in the array between the generated functions `getSessionId(..)` and `getUserId(..)`, by merging two lists:
10901090

10911091
```js
10921092
.reduce( mergeReducer, [ lookupUser ] )
@@ -1517,6 +1517,6 @@ Three common and powerful list operations we looked at:
15171517

15181518
Other more advanced operations that are useful in processing lists: `unique(..)`, `flatten(..)`, and `merge(..)`.
15191519

1520-
Fusion uses function composition techniques to consolidate multiple adjacent `map(..)` calls. This is mostly a performance optimization, but it also improves the declarative nature of your list operations.
1520+
Fusion uses function composition to consolidate multiple adjacent `map(..)` calls. This is mostly a performance optimization, but it also improves the declarative nature of your list operations.
15211521

15221522
Lists are typically visualized as arrays, but can be generalized as any data structure that represents/produces an ordered collection of values. As such, all these "list operations" are actually "data structure operations".

0 commit comments

Comments
 (0)