@@ -2,7 +2,7 @@
22title = "Cores | ('bar')"
33weight = 7
44template = "doc.html"
5−aliases = ["docs/reference/hoon-expressions/rune/bar/"]
5+aliases = ["docs/reference/reference-expressions/rune/bar/"]
66+++
77Core expressions produce cores. A core is a cell of `[battery payload]`.
88The `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).
2222
2323Regular:
2424
25−```hoon
25+```reference
2626|_ a=spec
27−++ b=term c=hoon
28−++ d=term e=hoon
27+++ b=term c=reference
28+++ d=term e=reference
2929 ...
30−++ f=term g=hoon
30+++ f=term g=reference
3131--
3232```
3333
@@ -49,13 +49,13 @@ The context of the door is the subject of the `|_` expression.
4949
5050##### Expands to
5151
52−```hoon
52+```reference
5353=| a=spec
5454|%
55−++ b=term c=hoon
56−++ d=term e=hoon
55+++ b=term c=reference
56+++ d=term e=reference
5757 ...
58−++ f=term g=hoon
58+++ f=term g=reference
5959--
6060```
6161
@@ -68,7 +68,7 @@ Calling a door is like calling a gate except the caller also needs
6868to 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)`.
6969
7070Because 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).
7272
7373##### Examples
7474
@@ -87,7 +87,7 @@ A trivial door:
8787
8888A more interesting door, from the kernel library:
8989
90−```hoon
90+```reference
9191++ ne
9292 |_ tig=@
9393 ++ d (add tig '0')
@@ -112,12 +112,12 @@ Produce a core, `[battery payload]`.
112112
113113Regular:
114114
115−```hoon
115+```reference
116116|%
117−++ a=term b=hoon
118−++ c=term d=hoon
117+++ a=term b=reference
118+++ c=term d=reference
119119 ...
120−++ e=term f=hoon
120+++ e=term f=reference
121121--
122122```
123123
@@ -172,14 +172,14 @@ Produce a gate with a custom sample.
172172
173173Regular:
174174
175−```hoon
176−|: a=hoon b=hoon
175+```reference
176+|: a=reference b=hoon
177177```
178178
179179AST:
180180
181181```
182−[%brcl p=hoon q=hoon]
182+[%brcl p=reference q=hoon]
183183```
184184
185185##### Semantics
@@ -188,7 +188,7 @@ AST:
188188
189189##### Expands to
190190
191−```hoon
191+```reference
192192=> ^~ a
193193 |. b
194194```
@@ -220,14 +220,14 @@ Produce a trap (a core with one arm `$`).
220220
221221Regular:
222222
223−```hoon
224−|. a=hoon
223+```reference
224+|. a=reference
225225```
226226
227227AST:
228228
229229```
230−[%brdt p=hoon]
230+[%brdt p=reference]
231231```
232232
233233Semantics:
@@ -238,8 +238,8 @@ The payload of the core is the subject of the `|.` expression.
238238
239239##### Expands to
240240
241−```hoon
242−|% ++ $ a=hoon
241+```reference
242+|% ++ $ a=reference
243243--
244244```
245245
@@ -278,7 +278,7 @@ A more interesting trap:
278278Note that we can use `$()` to recurse back into the
279279trap, since it's a core with an `$` arm.
280280
281−> `$(...)` expands to `%=($ ...)` (["centis"](/docs/hoon/hoon-expressions/rune/cen#centis)).
281+> `$(...)` expands to `%=($ ...)` (["centis"](/docs/reference/hoon-expressions/rune/cen#centis)).
282282
283283### |- "barhep"
284284
@@ -288,14 +288,14 @@ Produce a trap (a core with one arm `$`) and evaluate it.
288288
289289Regular:
290290
291−```hoon
292−|- a=hoon
291+```reference
292+|- a=reference
293293```
294294
295295AST:
296296
297297```
298−[%brhp p=hoon]
298+[%brhp p=reference]
299299```
300300
301301##### Semantics
@@ -304,15 +304,15 @@ A `|-` expression produces a core with one arm named `$` and immediately evaluat
304304
305305##### Expands to
306306
307−```hoon
308−=<($ |.(a=hoon))
307+```reference
308+=<($ |.(a=reference))
309309```
310310
311311##### Discussion
312312
313313The `|-` 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 `$()`.
314314
315−> `$(...)` expands to `%=($ ...)` (["centis"](/docs/hoon/hoon-expressions/rune/cen#centis)).
315+> `$(...)` expands to `%=($ ...)` (["centis"](/docs/reference/hoon-expressions/rune/cen#centis)).
316316
317317##### Examples
318318
@@ -344,12 +344,12 @@ Produce a core whose battery includes a `$` arm and compute the latter.
344344
345345Regular:
346346
347−```hoon
348−|^ a=hoon
349−++ b=term c=hoon
350−++ d=term e=hoon
347+```reference
348+|^ a=reference
349+++ b=term c=reference
350+++ d=term e=reference
351351 ...
352−++ f=term g=hoon
352+++ f=term g=reference
353353--
354354```
355355
@@ -358,7 +358,7 @@ Note: The `++` rune may be replaced with any other rune in the `+` family.
358358AST:
359359
360360```
361−[%brkt p=hoon q=(map term tome)]
361+[%brkt p=reference q=(map term tome)]
362362```
363363
364364##### Semantics
@@ -367,13 +367,13 @@ A `|^` expression produces a multi-arm core whose battery includes a `$` arm, wh
367367
368368##### Expands to
369369
370−```hoon
370+```reference
371371=> |%
372− ++ $ a=hoon
373− ++ b=term c=hoon
374− ++ d=term e=hoon
372+ ++ $ a=reference
373+ ++ b=term c=reference
374+ ++ d=term e=reference
375375 ...
376− ++ f=term g=hoon
376+ ++ f=term g=reference
377377 --
378378$
379379```
@@ -403,14 +403,14 @@ Produce an iron gate.
403403
404404Regular:
405405
406−```hoon
407−|~ a=spec b=hoon
406+```reference
407+|~ a=spec b=reference
408408```
409409
410410AST:
411411
412412```
413−[%brsg p=spec q=hoon]
413+[%brsg p=spec q=reference]
414414```
415415
416416##### Semantics
@@ -419,13 +419,13 @@ A `|~` expression produces an iron gate. `a` defines the sample, and `b` define
419419
420420##### Expands to
421421
422−```hoon
422+```reference
423423^| |=(a b)
424424```
425425
426426##### Discussion
427427
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)
429429
430430##### Examples
431431
@@ -442,14 +442,14 @@ Produce a wet gate (one-armed core with sample).
442442
443443Regular:
444444
445−```hoon
446−|* a=spec b=hoon
445+```reference
446+|* a=spec b=reference
447447```
448448
449449AST:
450450
451451```
452−[%brtr p=spec q=hoon]
452+[%brtr p=spec q=reference]
453453```
454454
455455##### Semantics
@@ -458,7 +458,7 @@ A `|*` expression produces a wet gate. `a` defines the gate's sample, and `b` i
458458
459459##### Expands to
460460
461−```hoon
461+```reference
462462=| a
463463|@
464464++ $
@@ -479,7 +479,7 @@ you know what you're doing.
479479Just as with a [gate](#bartis), we can recurse back into a wet gate
480480with `$()`.
481481
482−> `$(...)` expands to `%=($ ...)` (["centis"](@/docs/hoon/hoon-expressions/rune/cen.md#centis)).
482+> `$(...)` expands to `%=($ ...)` (["centis"](@/docs/reference/hoon-expressions/rune/cen.md#centis)).
483483
484484##### Examples
485485
@@ -508,14 +508,14 @@ Produce a gate (a one-armed core with a sample).
508508
509509Regular:
510510
511−```hoon
512−|= a=spec b=hoon
511+```reference
512+|= a=spec b=reference
513513```
514514
515515AST:
516516
517517```
518−[%brts p=spec q=hoon]
518+[%brts p=spec q=reference]
519519```
520520
521521##### Definition
@@ -526,9 +526,9 @@ The product of a `|=` expression is a dry **gate**, i.e., a Hoon function.
526526
527527##### Expands to
528528
529−```hoon
529+```reference
530530=| a=spec
531−|% ++ $ b=hoon
531+|% ++ $ b=reference
532532--
533533```
534534
@@ -538,7 +538,7 @@ Dry gates are used for the vast majority of ordinary functions in Hoon.
538538
539539A gate is a core with one arm named `$`, so we can recurse back into it with `$()`.
540540
541−> `$(...)` expands to `%=($ ...)` (["centis"](@/docs/hoon/hoon-expressions/rune/cen.md#centis)).
541+> `$(...)` expands to `%=($ ...)` (["centis"](@/docs/reference/hoon-expressions/rune/cen.md#centis)).
542542
543543##### Examples
544544
@@ -568,12 +568,12 @@ Produce a 'wet' core `[battery payload]`.
568568
569569Regular:
570570
571−```hoon
571+```reference
572572|@
573−++ a=term b=hoon
574−++ c=term d=hoon
573+++ a=term b=reference
574+++ c=term d=reference
575575 ...
576−++ e=term f=hoon
576+++ e=term f=reference
577577--
578578```
579579
@@ -591,7 +591,7 @@ A `|@` expression produces a 'wet' core whose payload is the expression's subjec
591591
592592##### Discussion
593593
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).
595595
596596### |? "barwut"
597597
@@ -601,14 +601,14 @@ Produce a lead trap.
601601
602602Regular:
603603
604−```hoon
605−|? a=hoon
604+```reference
605+|? a=reference
606606```
607607
608608AST:
609609
610610```
611−[%brwt p=hoon]
611+[%brwt p=reference]
612612```
613613
614614##### Semantics
@@ -617,13 +617,13 @@ A `|?` expression produces a lead trap (i.e., a lead core with one arm named `$`
617617
618618##### Expands to
619619
620−```hoon
620+```reference
621621^? |. a
622622```
623623
624624##### Discussion
625625
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).
627627
628628##### Examples
629629