@@ -10,11 +10,11 @@ A `span` is a set of nouns and an interpretation of these nouns.
1010Officially, we don't use the word "type" in Hoon. But if we had
1111to say "type," it would mean `span`.
1212
13−## Span and mold
13+## Type, span and mold
1414
1515There is no Hoon syntax for a span. The programmer never defines
1616a span explicitly. It is always produced as the inferred range
17−of an expression (twig).
17+of an expression (`twig`).
1818
1919But we still need simple, well-formed expressions that produce
2020regular and well-shaped ranges, for three reasons.
@@ -37,15 +37,13 @@ definition of a noun. Don't actually call a mold unless you're
3737actually validating untrusted foreign data. As a beginner,
3838hopefully you aren't!
3939
40−## The `span` mold (simplified)
40+## `span`: a set of nouns
4141
42−Usually in Hoon we define the semantics of a primitive by the
43−state the span of all nouns that implement that primitive. We
44−state this span as the icon of a mold. That mold is produced by
45−a kernel arm `span`:
42+Below is the mold for `span`. You haven't seen this syntax before,
43+and we haven't explained it yet; just treat it as pseudocode.
4644
47−This is a slightly simplified version of `span`. We'll undo and
48−explain the simplifications below.
45+This is a slightly simplified version of `span`. We undo and explain the
46+simplifications in the [advanced types](../advanced) section.
4947
5048```
5149++ term @tas
@@ -61,13 +59,11 @@ explain the simplifications below.
6159 ==
6260```
6361
64−This is a syntactically correct Hoon twig, but treat it as
65−pseudocode. If a span is an atom, it's either the atomic string
66−`noun` or `void`; if a cell, it's a tuple with one of the heads
67−`atom`, `cell`, `core`, etc. We'll go through each of these
68−cases below.
62+If a span is an atom, it's either the atomic string `noun` or
63+`void`; if a cell, it's a tuple with one of the heads `atom`,
64+`cell`, `core`, etc. We'll go through each of these cases below.
6965
70−### `$noun` and `$void`
66+### `?($noun $void)`
7167
7268`$noun` is the set of all nouns. `$void` is the set of no nouns.
7369
@@ -76,7 +72,7 @@ cases below.
7672`{$cell p/span q/span}` is the set of all cells with head `p` and
7773tail `q`.
7874
79−### `{$fork p/(set span)}
75+### `{$fork p/(set span)}`
8076
8177`{$fork p/(set span)}` is the union of all spans in the set `p`.
8278
@@ -89,17 +85,17 @@ the product when we compile `q` against subject `p`.
8985This is "manual laziness." Hoon is a strict language, so we have
9086to express
9187
92−### `{$face p/term q/span}
88+### `{$face p/term q/span}`
9389
9490A `{$face p/term q/span}` wraps the label `p` around the span
9591`q`. `p` is a `term` or `@tas`, an atomic ASCII string which
9692obeys symbol rules: lowercase and digit only, infix hyphen,
9793first character must be lowercase.
9894
99−See [`:limb`](twig/limb/limb) for how labels are resolved. It's
95+See [`:limb`](../twig/limb/limb) for how labels are resolved. It's
10096nontrivial.
10197
102−### `{%atom p/term q/(unit atom))}
98+### `{%atom p/term q/(unit atom))}`
10399
104100An `$atom` is an atom, with two twists. `q` is a `unit`, Hoon's
105101equivalent of a nullable pointer or a Haskell `Maybe`. If `q`
@@ -161,7 +157,7 @@ statically, by casting through the empty aura `@`. Hoon is not
161157dependently typed and can't statically enforce data constraints
162158(for example, it can't enforce that a `@tas` is really a symbol).
163159
164−### `{$core p/span q/(map term span)}
160+### `{$core p/span q/(map term span)}`
165161
166162A `$core` is a code-data cell. The data (or *payload*) is the
167163tail; the code (or *battery*) is the head. `p`, a span, is the