@@ -10,15 +10,72 @@ needed to run those formulas correctly.
1010
1111Four core runes (`|=`, `|.`, `|-`, and `|*`) produce a
1212core with a single arm, named `$`. We can recompute this arm
13−with changes, which useful for recursion among other things:
13+with changes, which is useful for recursion among other things.
1414
1515## Runes
1616
1717### |$ "barbuc"
1818
19−`{$brbs sample=(lest term) body=spec} `
19+Produces a wet gate that creates a structure parameterized by molds.
2020
21−Produces a wet gate with a single arm named `$` (I think).
21+##### Syntax
22+
23+Regular:
24+```hoon
25+|$ a=(lest term) b=spec
26+```
27+
28+AST:
29+```hoon
30+[%brbs sample=(lest term) body=spec]
31+```
32+
33+##### Semantics
34+
35+`|$` is used to create a wet gate that is polymorphic in its input types and
36+produces a structure. `a` is a `lest` of `term` used as identifiers for the
37+input types. `b` is a structure built from elements of `a`. The output of `|$`
38+is a `spec` obtained by substituting the input types parameterized by `a` into
39+the `b`.
40+
41+##### Expands to
42+
43+I'm having some trouble deciphering this, would appreciate help. From `hoon.hoon`:
44+```hoon
45+ {$brbs *} =- ?~ - !!
46+ [%brtr [%bscl -] [%ktcl body.gen]]
47+ %+ turn `(list term)`sample.gen
48+ |= =term
49+ ^- spec
50+ =/ tar [%base %noun]
51+ [%bsts term [%bssg tar [%bshp tar tar]]]
52+```
53+
54+##### Discussion
55+
56+`|$` is a restricted form of `|*`. The use of `|$` over `|*` is one of style, as either could
57+be used to make wet gates that produce structures. The buc in `|$` is a hint that
58+`|$` is closely related to buc runes, and thus `|$` should be used to make wet
59+gates that produce structures, while `|*` should be used for any other sort of
60+wet gate. Thus, the second argument of `|$` is frequently a buc
61+rune. For further discussion of wet gates, see the entry for [`|*`](#bartar).
62+
63+Unlike other single-armed cores, `|$` does not have an arm named `$` that can be recursed upon.
64+
65+Proper style for `|$` is to enclose the first argument with brackets, even if it
66+is only a single term. The interpeter will accept a single term without brackets
67+just fine, but this style is for consistency with the fact that the first argument is a `lest`.
68+
69+##### Examples
70+
71+```
72+~zod:dojo> =foo |$([a b] [b a])
73+
74+~zod:dojo> =bar (foo [@ @tas])
75+
76+~zod:dojo> (bar %cat 3)
77+[%cat 3]
78+```
2279
2380### |_ "barcab"
2481
@@ -236,7 +293,7 @@ AST:
236293[%brdt p=hoon]
237294```
238295
239−Semantics:
296+##### Semantics
240297
241298A `|.` expression produces a core with a single arm, `$`. The core isn't explicitly given a sample. `a` is a Hoon expression that defines the computation of the `$` arm.
242299
@@ -460,7 +517,8 @@ AST:
460517
461518##### Semantics
462519
463−A `|*` expression produces a wet gate. `a` defines the gate's sample, and `b` is a Hoon expression that determines the output value of the gate.
520+A `|*` expression produces a wet gate. `a` defines the gate's sample, and `b`
521+is a Hoon expression that determines the output value of the gate.
464522
465523##### Expands to
466524
@@ -487,6 +545,9 @@ with `$()`.
487545
488546> `$(...)` expands to `%=($ ...)` (["centis"](@/docs/reference/hoon-expressions/rune/cen.md#centis)).
489547
548+`|*` can be used to make wet gates that produce structures, but this usage is
549+discouraged in favor of `|$`.
550+
490551##### Examples
491552
492553Wet and dry gates in a nutshell: