@@ -2,7 +2,7 @@
2title = "Cores | ('bar')"
2title = "Cores | ('bar')"
4template = "doc.html"
4template = "doc.html"
5−aliases = ["docs/reference/hoon-expressions/rune/bar/"]
5+aliases = ["docs/reference/reference-expressions/rune/bar/"]
7Core expressions produce cores. A core is a cell of `[battery payload]`.
7Core expressions produce cores. A core is a cell of `[battery payload]`.
8The `battery` is code, a battery of Nock formulas. The `payload` is the data
8The `battery` is code, a battery of Nock formulas. The `payload` is the data
@@ -22,12 +22,12 @@ Produce a **door** (a core with a sample).
25−```hoon
25+```reference
27−++ b=term c=hoon
27+++ b=term c=reference
28−++ d=term e=hoon
28+++ d=term e=reference
30−++ f=term g=hoon
30+++ f=term g=reference
@@ -49,13 +49,13 @@ The context of the door is the subject of the `|_` expression.
50##### Expands to
50##### Expands to
52−```hoon
52+```reference
55−++ b=term c=hoon
55+++ b=term c=reference
56−++ d=term e=hoon
56+++ d=term e=reference
58−++ f=term g=hoon
58+++ f=term g=reference
@@ -68,7 +68,7 @@ Calling a door is like calling a gate except the caller also needs
68to specify the arm to be computed. So, for example, if you have some door `door` which contains some arm `arm`, and you want to pass some argument (i.e., input value `arg`), you would call it with `~(arm door arg)`.
68to specify the arm to be computed. So, for example, if you have some door `door` which contains some arm `arm`, and you want to pass some argument (i.e., input value `arg`), you would call it with `~(arm door arg)`.
70Because gates are also doors, you can call them the same way. To call the gate `foo` as a door, instead of `(foo baz)` we would write `~($ foo baz)`. This
70Because gates are also doors, you can call them the same way. To call the gate `foo` as a door, instead of `(foo baz)` we would write `~($ foo baz)`. This
71−is an irregular form for `%~($ foo baz)`, [%~](/docs/hoon/hoon-expressions/rune/cen#sig).
71+is an irregular form for `%~($ foo baz)`, [%~](/docs/reference/hoon-expressions/rune/cen#sig).
73##### Examples
73##### Examples
@@ -87,7 +87,7 @@ A trivial door:
88A more interesting door, from the kernel library:
88A more interesting door, from the kernel library:
90−```hoon
90+```reference
93 ++ d (add tig '0')
93 ++ d (add tig '0')
@@ -112,12 +112,12 @@ Produce a core, `[battery payload]`.
115−```hoon
115+```reference
117−++ a=term b=hoon
117+++ a=term b=reference
118−++ c=term d=hoon
118+++ c=term d=reference
120−++ e=term f=hoon
120+++ e=term f=reference
@@ -172,14 +172,14 @@ Produce a gate with a custom sample.
175−```hoon
175+```reference
176−|: a=hoon b=hoon
176+|: a=reference b=hoon
182−[%brcl p=hoon q=hoon]
182+[%brcl p=reference q=hoon]
185##### Semantics
185##### Semantics
@@ -188,7 +188,7 @@ AST:
189##### Expands to
189##### Expands to
191−```hoon
191+```reference
@@ -220,14 +220,14 @@ Produce a trap (a core with one arm `$`).
223−```hoon
223+```reference
224−|. a=hoon
224+|. a=reference
230−[%brdt p=hoon]
230+[%brdt p=reference]
233Semantics:
233Semantics:
@@ -238,8 +238,8 @@ The payload of the core is the subject of the `|.` expression.
239##### Expands to
239##### Expands to
241−```hoon
241+```reference
242−|% ++ $ a=hoon
242+|% ++ $ a=reference
@@ -278,7 +278,7 @@ A more interesting trap:
278Note that we can use `$()` to recurse back into the
278Note that we can use `$()` to recurse back into the
279trap, since it's a core with an `$` arm.
279trap, since it's a core with an `$` arm.
281−> `$(...)` expands to `%=($ ...)` (["centis"](/docs/hoon/hoon-expressions/rune/cen#centis)).
281+> `$(...)` expands to `%=($ ...)` (["centis"](/docs/reference/hoon-expressions/rune/cen#centis)).
283### |- "barhep"
283### |- "barhep"
@@ -288,14 +288,14 @@ Produce a trap (a core with one arm `$`) and evaluate it.
291−```hoon
291+```reference
292−|- a=hoon
292+|- a=reference
298−[%brhp p=hoon]
298+[%brhp p=reference]
301##### Semantics
301##### Semantics
@@ -304,15 +304,15 @@ A `|-` expression produces a core with one arm named `$` and immediately evaluat
305##### Expands to
305##### Expands to
307−```hoon
307+```reference
308−=<($ |.(a=hoon))
308+=<($ |.(a=reference))
311##### Discussion
311##### Discussion
313The `|-` rune can be thought of as a 'recursion point' or a 'loop starting point'. Since `|-` makes a `|.` (["bardot"](#bardot), a core with one arm named `$`, we can recurse back into it with `$()`.
313The `|-` rune can be thought of as a 'recursion point' or a 'loop starting point'. Since `|-` makes a `|.` (["bardot"](#bardot), a core with one arm named `$`, we can recurse back into it with `$()`.
315−> `$(...)` expands to `%=($ ...)` (["centis"](/docs/hoon/hoon-expressions/rune/cen#centis)).
315+> `$(...)` expands to `%=($ ...)` (["centis"](/docs/reference/hoon-expressions/rune/cen#centis)).
317##### Examples
317##### Examples
@@ -344,12 +344,12 @@ Produce a core whose battery includes a `$` arm and compute the latter.
347−```hoon
347+```reference
348−|^ a=hoon
348+|^ a=reference
349−++ b=term c=hoon
349+++ b=term c=reference
350−++ d=term e=hoon
350+++ d=term e=reference
352−++ f=term g=hoon
352+++ f=term g=reference
@@ -358,7 +358,7 @@ Note: The `++` rune may be replaced with any other rune in the `+` family.
361−[%brkt p=hoon q=(map term tome)]
361+[%brkt p=reference q=(map term tome)]
364##### Semantics
364##### Semantics
@@ -367,13 +367,13 @@ A `|^` expression produces a multi-arm core whose battery includes a `$` arm, wh
368##### Expands to
368##### Expands to
370−```hoon
370+```reference
372− ++ $ a=hoon
372+ ++ $ a=reference
373− ++ b=term c=hoon
373+ ++ b=term c=reference
374− ++ d=term e=hoon
374+ ++ d=term e=reference
376− ++ f=term g=hoon
376+ ++ f=term g=reference
@@ -403,14 +403,14 @@ Produce an iron gate.
406−```hoon
406+```reference
407−|~ a=spec b=hoon
407+|~ a=spec b=reference
413−[%brsg p=spec q=hoon]
413+[%brsg p=spec q=reference]
416##### Semantics
416##### Semantics
@@ -419,13 +419,13 @@ A `|~` expression produces an iron gate. `a` defines the sample, and `b` define
420##### Expands to
420##### Expands to
422−```hoon
422+```reference
423^| |=(a b)
423^| |=(a b)
426##### Discussion
426##### Discussion
428−See [this discussion of core variance models](@/docs/hoon/hoon-expressions/advanced.md)
428+See [this discussion of core variance models](@/docs/reference/hoon-expressions/advanced.md)
430##### Examples
430##### Examples
@@ -442,14 +442,14 @@ Produce a wet gate (one-armed core with sample).
445−```hoon
445+```reference
446−|* a=spec b=hoon
446+|* a=spec b=reference
452−[%brtr p=spec q=hoon]
452+[%brtr p=spec q=reference]
455##### Semantics
455##### Semantics
@@ -458,7 +458,7 @@ A `|*` expression produces a wet gate. `a` defines the gate's sample, and `b` i
459##### Expands to
459##### Expands to
461−```hoon
461+```reference
@@ -479,7 +479,7 @@ you know what you're doing.
479Just as with a [gate](#bartis), we can recurse back into a wet gate
479Just as with a [gate](#bartis), we can recurse back into a wet gate
480with `$()`.
480with `$()`.
482−> `$(...)` expands to `%=($ ...)` (["centis"](@/docs/hoon/hoon-expressions/rune/cen.md#centis)).
482+> `$(...)` expands to `%=($ ...)` (["centis"](@/docs/reference/hoon-expressions/rune/cen.md#centis)).
484##### Examples
484##### Examples
@@ -508,14 +508,14 @@ Produce a gate (a one-armed core with a sample).
511−```hoon
511+```reference
512−|= a=spec b=hoon
512+|= a=spec b=reference
518−[%brts p=spec q=hoon]
518+[%brts p=spec q=reference]
521##### Definition
521##### Definition
@@ -526,9 +526,9 @@ The product of a `|=` expression is a dry **gate**, i.e., a Hoon function.
527##### Expands to
527##### Expands to
529−```hoon
529+```reference
531−|% ++ $ b=hoon
531+|% ++ $ b=reference
@@ -538,7 +538,7 @@ Dry gates are used for the vast majority of ordinary functions in Hoon.
539A gate is a core with one arm named `$`, so we can recurse back into it with `$()`.
539A gate is a core with one arm named `$`, so we can recurse back into it with `$()`.
541−> `$(...)` expands to `%=($ ...)` (["centis"](@/docs/hoon/hoon-expressions/rune/cen.md#centis)).
541+> `$(...)` expands to `%=($ ...)` (["centis"](@/docs/reference/hoon-expressions/rune/cen.md#centis)).
543##### Examples
543##### Examples
@@ -568,12 +568,12 @@ Produce a 'wet' core `[battery payload]`.
571−```hoon
571+```reference
573−++ a=term b=hoon
573+++ a=term b=reference
574−++ c=term d=hoon
574+++ c=term d=reference
576−++ e=term f=hoon
576+++ e=term f=reference
@@ -591,7 +591,7 @@ A `|@` expression produces a 'wet' core whose payload is the expression's subjec
592##### Discussion
592##### Discussion
594−The `|@` rune is just like the `|%` rune except that instead of producing a 'dry' core, it produces a 'wet' one. This allows for type polymorphism of its arms, using 'genericity'. See [Advanced types](@/docs/hoon/hoon-expressions/advanced.md).
594+The `|@` rune is just like the `|%` rune except that instead of producing a 'dry' core, it produces a 'wet' one. This allows for type polymorphism of its arms, using 'genericity'. See [Advanced types](@/docs/reference/hoon-expressions/advanced.md).
596### |? "barwut"
596### |? "barwut"
@@ -601,14 +601,14 @@ Produce a lead trap.
604−```hoon
604+```reference
605−|? a=hoon
605+|? a=reference
611−[%brwt p=hoon]
611+[%brwt p=reference]
614##### Semantics
614##### Semantics
@@ -617,13 +617,13 @@ A `|?` expression produces a lead trap (i.e., a lead core with one arm named `$`
618##### Expands to
618##### Expands to
620−```hoon
620+```reference
624##### Discussion
624##### Discussion
626−See this [discussion of the core variance model](@/docs/hoon/hoon-expressions/advanced.md).
626+See this [discussion of the core variance model](@/docs/reference/hoon-expressions/advanced.md).
628##### Examples
628##### Examples