on master help sign in
Refactor the `:moar` explanation

Before applying this commit, the four one-armed core twigs each include the following: > > :moar() expands to :make($) (%=($)), accepting a jogging body > > containing a list of changes to the subject. * The adjacency of the keyword and runic expressions is confusing (at least to me. * This information is repeated in four places but not in the parent document, bar-core.md * This does not strike me as the natural place for this tidbit—though this commit does not necessarily address that fully.

commitb3b66bb05372e45aedec85ee57767c628c23bb52 author~hidwes-matped <jim.amberger@gmail.com> dateSat 30 Jul 2016, 15:09 (10 years ago) parent790c24e
5 files changed+33−9
docs/hoon/twig/bar-core.md+11 docs/hoon/twig/bar-core/dot-trap.md+5−2 docs/hoon/twig/bar-core/hep-loop.md+6−3 docs/hoon/twig/bar-core/tar-gill.md+5−2 docs/hoon/twig/bar-core/tis-gate.md+6−2
docs/hoon/twig/bar-core.md+11
@@ -14,6 +14,17 @@ section in [`span`](../../basic#-core-p-span-q-map-term-span) above.)
1414`$core` uses the subject as the payload of a battery, whose arms are
1515compiled with the core itself as the subject.
1616
17+Four of these twigs (`:gate`, `:trap`, `:loop`, and `:gill`) produce a
18+core with a single arm, named `$`. We can recompute this arm with changes,
19+useful for recursion among other things:
20+
21+> `:moar()` expands to `:make($)`, accepting a *jogging* body
22+> containing a list of changes to the subject.
23+
24+> `$()` expands to `%=($)`, accepting a *jogging* body
25+> containing a list of changes to the subject.
26+
27+
1728## Stems
1829
1930<list dataPreview="true" className="runes"></list>
docs/hoon/twig/bar-core/dot-trap.md+5−2
@@ -58,5 +58,8 @@ A more interesting trap:
5858Note that we can use `:moar()` or `$()` to recurse back into the
5959trap, since it's a core with an `$` arm.
6060
61−> `:moar()` expands to `:make($)` (`%=($)`), accepting a *jogging* body
62−> containing a list of changes to the subject.
61+> `:moar()` expands to `:make($)`, accepting a *jogging* body containing a list
62+> of changes to the subject.
63+
64+> `$()` expands to `%=($)`, accepting a *jogging* body containing a
65+> list of changes to the subject.
docs/hoon/twig/bar-core/hep-loop.md+6−3
@@ -6,7 +6,7 @@ sort: 4
66
77# `:loop |- "barhep"`
88
9−`{$loop p/seed}`: form a trap and kick it.
9+`{$loop p/seed}`: form a trap and kick ("*call*") it.
1010
1111## Expands to
1212
@@ -29,8 +29,11 @@ The `:loop` keyword (and `|-` rune) can be thought of as a "recursion point" -
2929since `:loop` makes a `:trap` (a core with one arm named `$`), we can recurse
3030back into it with `:moar()` or `$()`.
3131
32−> `:moar()` expands to `:make($)` (`%=($)`), accepting a *jogging* body
33−> containing a list of changes to the subject.
32+> `:moar()` expands to `:make($)`, accepting a *jogging* body containing a list
33+> of changes to the subject.
34+
35+> `$()` expands to `%=($)`, accepting a *jogging* body containing a
36+> list of changes to the subject.
3437
3538## Examples
3639
docs/hoon/twig/bar-core/tar-gill.md+5−2
@@ -40,8 +40,11 @@ you think you know what you're doing.
4040
4141Just as with a `:gate`, we can recurse back into a `:gill` with `:moar()` or `$()`.
4242
43−> `:moar()` expands to `:make($)` (`%=($)`), accepting a *jogging* body
44−> containing a list of changes to the subject.
43+> `:moar()` expands to `:make($)`, accepting a *jogging* body containing a list
44+> of changes to the subject.
45+
46+> `$()` expands to `%=($)`, accepting a *jogging* body containing a
47+> list of changes to the subject.
4548
4649## Examples
4750
docs/hoon/twig/bar-core/tis-gate.md+6−2
@@ -33,8 +33,12 @@ Regular: *2-fixed*.
3333A gate is a core with one arm named `$`, so, just as with `:loop` (`|-`),
3434we can recurse back into it with `:moar()` or `$()`.
3535
36−> `:moar()` expands to `:make($)` (`%=($)`), accepting a *jogging* body
37−> containing a list of changes to the subject.
36+
37+> `:moar()` expands to `:make($)`, accepting a *jogging* body containing a list
38+> of changes to the subject.
39+
40+> `$()` expands to `%=($)`, accepting a *jogging* body containing a
41+> list of changes to the subject.
3842
3943## Examples
4044