@@ -65,14 +65,14 @@ A ship's *pier* is its Unix directory. For planets the name of the pier is usua
6565
6666> Nock is a Turing-complete, non-lambda combinator interpreter.
6767
68−- *noun*: an *atom* or a *cell*
6968- *atom*: any natural number
7069- *cell*: any ordered pair of nouns
71−- *subject*: a noun - the data against which a `formula` is
72− evaluated
7370- *formula*: a noun - a function at the Nock level
71+- *noun*: an *atom* or a *cell*
7472- *product*: a noun - the result of evaluating a formula against a
7573 subject
74+- *subject*: a noun - the data against which a `formula` is
75+ evaluated
7676
7777*See [Nock definition](../../nock/definition/).*
7878
@@ -81,25 +81,6 @@ A ship's *pier* is its Unix directory. For planets the name of the pier is usua
8181> Hoon is a strict, higher-order typed functional language that compiles
8282> itself to Nock.
8383
84−###### <h6 id="span">span:</h6> an inferred type
85−
86−A *span* defines a set (finite or infinite) of nouns and ascribes some
87−semantics to it. There is no Hoon syntax for a span; it is always
88−produced as the inferred range of an expression (*twig*).
89−
90−*See [basic types](../../hoon/basic/#-type-span-and-mold).*
91−
92−###### <h6 id="core">core:</h6> a code-data cell
93−
94−The code (*battery*) is the head, the data (*payload*) is the tail. All
95−code-data structures in normal languages (functions, objects, modules,
96−etc) become *core*s in Hoon.
97−
98−- <h6 id="battery">*battery*:</h6> the code of a core, a tree of *arms*
99−- <h6 id="payload">*payload*:</h6> the data in a core
100−
101−*See [basic types](../../hoon/basic)*.
102−
10384###### <h6 id="arm">arm:</h6> a named, functionally-computed attribute of a core
10485
10586The *twig* of each arm is compiled to a Nock formula, with the
@@ -120,46 +101,6 @@ context.
120101
121102*See [advanced types](/hoon/advanced)*.
122103
123−###### metal: a variance model
124−
125−Every core has a *metal* which defines its variance model (ie, the
126−properties of the span of a compatible core). The default is `gold`
127−(invariant).
128−
129−- `gold`: *invariant*
130−- `lead`: *bivariant*
131−- `zinc`: *covariant*
132−- `iron`: *contravariant*
133−
134−*See [advanced types](/hoon/advanced)*.
135−
136−###### <h6 id="gate">gate:</h6> a function/lambda/closure
137−
138−A *gate* is a core with one arm. To call a gate on an argument,
139−replace the sample (at [tree
140−address](../../hoon/twig/limb/limb/) `+6` in the core) with the
141−argument, and then compute the arm.
142−
143−The payload of a gate has a shape of `{sample context}`.
144−
145−- *sample*: the argument tuple
146−- *context*: the subject in which the gate was defined
147−
148−*See [basic types](../../hoon/basic/#-core-p-span-q-map-term-span),
149−[`%-` or `:call`](../../hoon/twig/cen-call/hep-call/) (the `twig` for
150−calling a `gate`).*
151−
152−###### <h6 id="mold">mold:</h6> a type constructor / validator
153−
154−A *mold* is an idempotent gate (function), accepting any noun, and
155−producing a range with a useful span.
156−
157−- *bunt*: the value a mold produces when normalizing its default
158− sample
159−- *icon*: the span of the mold's range
160−
161−*See [mold twigs](/hoon/twig/buc-mold/).*
162−
163104###### atom
164105
165106A Hoon *atom* span describes a Nock atom, with two additional pieces
@@ -196,39 +137,42 @@ Some common auras and their aliases:
196137
197138*See [basic types](../../hoon/basic/#-atom-p-term-q-unit-atom)*.
198139
199−###### <h6 id="twig">twig:</h6> a Hoon expression
140+###### <h6 id="core">core:</h6> a code-data cell
200141
201−A *twig* is a Hoon expression. Specifically, twig is the mold for the
202−noun that a Hoon source expression compiles to. A twig is always a cell.
142+The code (*battery*) is the head, the data (*payload*) is the tail. All
143+code-data structures in normal languages (functions, objects, modules,
144+etc) become *core*s in Hoon.
203145
204−A twig has one of two forms: `{twig twig}`, which produces the ordered
205−pair of the two twigs, or a cell `{stem bulb}`, where `stem` is an
206−atomic symbol.
146+- <h6 id="battery">*battery*:</h6> the code of a core, a tree of *arms*
147+- <h6 id="payload">*payload*:</h6> the data in a core
207148
208−- <h6 id="stem">*stem*:</h6> an atomic symbol (`@tas`) - the name of a twig.
209−- <h6 id="bulb">*bulb*:</h6> The mold of the twig's contents.
149+*See [basic types](../../hoon/basic)*.
210150
211−Most twigs have a *regular form*, beginning with a *rune*. Some twigs
212−also have a syntactic *irregular form*; a few have *only* an *irregular form*.
151+###### face: a labeled subtree
213152
214−- <h6 id="rune">*rune*:</h6> a pair of ASCII symbols used to begin a twig.
153+Hoon has no scope or symbol-table; there is only the subject. To
154+"declare" a "variable" is to construct a new subject:
155+`[name=value old-subject]`.
215156
216−For example, the rune [`?:`](../../hoon/twig/wut-test/col-if/) is
217−Hoon's most common conditional, a branch on a boolean test. The first symbol
218−in a rune represents a family of related `twig`s. For example, the
219−[`?` family](../../hoon/twig/wut-test/) are all conditionals.
157+A *face* is a span that wraps a name (`@tas`) around another span.
220158
221−A regular twig has two syntactic forms, *tall* and *flat*:
159+*See [advanced types](../../hoon/advanced/#-face-aliases-and-bridges)*.
222160
223−- *tall*: multiple lines, no parentheses, two or more spaces between
224− tokens
225−- *flat*: one line, parentheses, one space between tokens
161+###### <h6 id="gate">gate:</h6> a function/lambda/closure
226162
227−Tall twigs can contain flat ones, but not vice versa. All irregular
228−forms are flat.
163+A *gate* is a core with one arm. To call a gate on an argument,
164+replace the sample (at [tree
165+address](../../hoon/twig/limb/limb/) `+6` in the core) with the
166+argument, and then compute the arm.
229167
230−*See [twig concept](../../hoon/concepts/#-twig-expression),
231−[expressions](../../hoon/twig/), and [syntax](../../hoon/syntax/)*.
168+The payload of a gate has a shape of `{sample context}`.
169+
170+- *sample*: the argument tuple
171+- *context*: the subject in which the gate was defined
172+
173+*See [basic types](../../hoon/basic/#-core-p-span-q-map-term-span),
174+[`%-` or `:call`](../../hoon/twig/cen-call/hep-call/) (the `twig` for
175+calling a `gate`).*
232176
233177###### limb: attribute or variable reference
234178
@@ -243,6 +187,44 @@ found, the result is the product of the arm.
243187
244188*See [Limbs and wings](../../hoon/twig/limb)*
245189
190+###### loobean: a Hoon boolean
191+
192+`0` (`%.y`) is *yes*, `1` (`%.n`) is *no*.
193+
194+> Why? It's fresh, it's different, it's new. And it's annoying. And it
195+> keeps you on your toes. And it's also just intuitively right.
196+
197+###### metal: a variance model
198+
199+Every core has a *metal* which defines its variance model (ie, the
200+properties of the span of a compatible core). The default is `gold`
201+(invariant).
202+
203+- `gold`: *invariant*
204+- `lead`: *bivariant*
205+- `zinc`: *covariant*
206+- `iron`: *contravariant*
207+
208+*See [advanced types](/hoon/advanced)*.
209+
210+###### <h6 id="mold">mold:</h6> a type constructor / validator
211+
212+A *mold* is an idempotent gate (function), accepting any noun, and
213+producing a range with a useful span.
214+
215+- *bunt*: the value a mold produces when normalizing its default
216+ sample
217+- *icon*: the span of the mold's range
218+
219+*See [mold twigs](/hoon/twig/buc-mold/).*
220+
221+###### nest: type compatibility test
222+
223+*nest* is an internal function on two spans, which produces yes if the
224+set of nouns in the second span is provably a subset of the first.
225+
226+*See [advanced types](../../hoon/advanced/)*.
227+
246228###### slot: a tree addressing scheme
247229
248230Every cell has a head and a tail, each of which may be either an atom or
@@ -250,26 +232,44 @@ a cell. Therefore every noun is a binary tree. `+1` or `.` resolves to
250232the whole cell (technically this would work against an atom as well).
251233The head of `+n` is `+2n`, the tail is `+(2n+1)`.
252234
253−###### face: a labeled subtree
235+###### <h6 id="span">span:</h6> an inferred type
254236
255−Hoon has no scope or symbol-table; there is only the subject. To
256−"declare" a "variable" is to construct a new subject:
257−`[name=value old-subject]`.
237+A *span* defines a set (finite or infinite) of nouns and ascribes some
238+semantics to it. There is no Hoon syntax for a span; it is always
239+produced as the inferred range of an expression (*twig*).
258240
259−A *face* is a span that wraps a name (`@tas`) around another span.
241+*See [basic types](../../hoon/basic/#-type-span-and-mold).*
260242
261−*See [advanced types](../../hoon/advanced/#-face-aliases-and-bridges)*.
243+###### <h6 id="twig">twig:</h6> a Hoon expression
262244
263−###### nest: type compatibility test
245+A *twig* is a Hoon expression. Specifically, twig is the mold for the
246+noun that a Hoon source expression compiles to. A twig is always a cell.
264247
265−*nest* is an internal function on two spans, which produces yes if the
266−set of nouns in the second span is provably a subset of the first.
248+A twig has one of two forms: `{twig twig}`, which produces the ordered
249+pair of the two twigs, or a cell `{stem bulb}`, where `stem` is an
250+atomic symbol.
267251
268−*See [advanced types](../../hoon/advanced/)*.
252+- <h6 id="stem">*stem*:</h6> an atomic symbol (`@tas`) - the name of a twig.
253+- <h6 id="bulb">*bulb*:</h6> The mold of the twig's contents.
269254
270−###### loobean: a Hoon boolean
255+Most twigs have a *regular form*, beginning with a *rune*. Some twigs
256+also have a syntactic *irregular form*; a few have *only* an *irregular form*.
271257
272−`0` (`%.y`) is *yes*, `1` (`%.n`) is *no*.
258+- <h6 id="rune">*rune*:</h6> a pair of ASCII symbols used to begin a twig.
273259
274−> Why? It's fresh, it's different, it's new. And it's annoying. And it
275−> keeps you on your toes. And it's also just intuitively right.
260+For example, the rune [`?:`](../../hoon/twig/wut-test/col-if/) is
261+Hoon's most common conditional, a branch on a boolean test. The first symbol
262+in a rune represents a family of related `twig`s. For example, the
263+[`?` family](../../hoon/twig/wut-test/) are all conditionals.
264+
265+A regular twig has two syntactic forms, *tall* and *flat*:
266+
267+- *tall*: multiple lines, no parentheses, two or more spaces between
268+ tokens
269+- *flat*: one line, parentheses, one space between tokens
270+
271+Tall twigs can contain flat ones, but not vice versa. All irregular
272+forms are flat.
273+
274+*See [twig concept](../../hoon/concepts/#-twig-expression),
275+[expressions](../../hoon/twig/), and [syntax](../../hoon/syntax/)*.