on master help sign in
Fixed small style and grammar errors
066890bJoseph E.S. Cieslik
docs/hoon/advanced.md+7−7
@@ -72,12 +72,12 @@ polymorphism relies on genericity.
72### Dry arms
72### Dry arms
73
73
74For a dry arm, we apply the Liskov substitution principle: we
74For a dry arm, we apply the Liskov substitution principle: we
75−ask, "can we use any `p` as if it was a `q.q`"? This is the same
75+ask, "can we use any `p` as if it was a `q.q`?" This is the same
76test as in `:cast` or any type comparison (`nest`). Intuitively,
76test as in `:cast` or any type comparison (`nest`). Intuitively,
77−we ask: is the new payload compatible with the old payload?
77+we ask: "is the new payload compatible with the old payload?"
78
78
79For a core `a`, if `p.a` fits in `q.q.a`, we can use arms on the
79For a core `a`, if `p.a` fits in `q.q.a`, we can use arms on the
80−core. The product of an dry arm whose twig is `b` is always
80+core. The product of a dry arm whose twig is `b` is always
81defined as `{$hold a(p q.q.a, p.q %gold) b}`.
81defined as `{$hold a(p q.q.a, p.q %gold) b}`.
82
82
83In other words, the subject of the arm computation is the
83In other words, the subject of the arm computation is the
@@ -89,7 +89,7 @@ call in most languages.
89
89
90Dry polymorphism works by substituting cores. Typically, the
90Dry polymorphism works by substituting cores. Typically, the
91the programmer uses one core as an interface definition, then
91the programmer uses one core as an interface definition, then
92−replace it with another core which does something useful.
92+replaces it with another core which does something useful.
93
93
94For core `b` to nest within core `a`, the batteries of `a` and
94For core `b` to nest within core `a`, the batteries of `a` and
95`b` must have the same tree shape, and the product of each `b`
95`b` must have the same tree shape, and the product of each `b`
@@ -108,7 +108,7 @@ is gold; a gold core can be cast or converted to any metal, and
108any metal can be cast or converted to lead.
108any metal can be cast or converted to lead.
109
109
110A gold core `a` has a read-write payload; another core `b` that
110A gold core `a` has a read-write payload; another core `b` that
111−nests within it (ie, can be substituted for it) must be a gold
111+nests within it (i.e., can be substituted for it) must be a gold
112core whose payload is mutually compatible (`+3.a` nests in `+3.b`,
112core whose payload is mutually compatible (`+3.a` nests in `+3.b`,
113`+3.b` nests in `+3.a`). Hence, *invariant*.
113`+3.b` nests in `+3.a`). Hence, *invariant*.
114
114
@@ -128,8 +128,8 @@ nests within `+6.a`. Hence, *covariant*.
128
128
129### Wet arms
129### Wet arms
130
130
131−For a wet arm, we ask: suppose this core was actually compiled
131+For a wet arm, we ask: "suppose this core was actually compiled
132−using `p` instead of `q.q`? Would the Nock formula we generated
132+using `p` instead of `q.q`?" Would the Nock formula we generated
133for `q.q` actually work for a `p` payload?
133for `q.q` actually work for a `p` payload?
134
134
135A wet arm with twig `b` in core `a` produces the span `{$hold a
135A wet arm with twig `b` in core `a` produces the span `{$hold a
docs/hoon/examples.md+2−2
@@ -17,7 +17,7 @@ side of simple manual construction over high-octane FP.)
17## `sieve`: code in basic style
17## `sieve`: code in basic style
18
18
19A function that produces the list of primes less than or equal to
19A function that produces the list of primes less than or equal to
20−than its argument, an atom:
20+its argument, an atom:
21```
21```
22:gate thru/atom :: 1
22:gate thru/atom :: 1
23:cast (list atom) :: 2
23:cast (list atom) :: 2
@@ -313,7 +313,7 @@ Line `13` defines the `spot` mold, a 2D coordinate.
313 == :: 16
313 == :: 16
314```
314```
315
315
316−Lines `14` to `16` define the `fact` mold, a game event (ie,
316+Lines `14` to `16` define the `fact` mold, a game event (i.e.,
317output action), as a book (tagged union). There are two forms of
317output action), as a book (tagged union). There are two forms of
318`fact`: `[%tie ~]` (reporting a tie), and `[%win cord]`
318`fact`: `[%tie ~]` (reporting a tie), and `[%win cord]`
319(reporting that `'X'` or `'O'` won a game.
319(reporting that `'X'` or `'O'` won a game.
docs/hoon/twig.md+1−1
@@ -28,7 +28,7 @@ Most stems are implemented as internal macros, however.
28The bulb is usually a tuple, sometimes a list or map. An element
28The bulb is usually a tuple, sometimes a list or map. An element
29of this structure is a *subexpression* or just *leg*.
29of this structure is a *subexpression* or just *leg*.
30
30
31−Usually a subexpression is itself a `twig`; sometimes it's an
31+Usually a subexpression is itself a `twig`; sometimes it's a
32`@tas` (symbol) or a `wing` (reference path).
32`@tas` (symbol) or a `wing` (reference path).
33
33
34## Moldy moss; woody seed
34## Moldy moss; woody seed