Skip to content

Commit 85437a1

Browse files
committed
Small tweaks to chapter 5
1 parent d3e85fb commit 85437a1

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

05_higher_order.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ If `f` takes more than one parameter, only the first one is passed
322322
through to it. We could add a bunch of arguments to the inner function
323323
(`arg1`, `arg2`, and so on) and pass all of them to `f`, but it is unclear
324324
how many would be necessary,
325-
since different `f`s might take different numbers of arguments.
325+
since different ++f++s might take different numbers of arguments.
326326
This solution would also deprive `f` of the
327327
information in `arguments.length`. Since we'd always pass the same
328328
number of arguments, it wouldn't know how many argument were
@@ -768,7 +768,7 @@ We could also have computed this number without relying on
768768
`reduceAncestors`. But separating the general approach (condensing a
769769
family tree) from the specific case (computing shared DNA) can improve
770770
the clarity of the code, and allows us to reuse the abstract part of
771-
the program for other cases. For example, the following code finds the number of
771+
the program for other cases. For example, the following code finds the percentage of
772772
known ancestors, for a given person, that lived past 70:
773773

774774
// test: clip

code/ancestry.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)