on master help sign in
list, inline code tic rendering, and zapgar output fixes
1f9ead8John Franklin
learn/hoon/hoon-tutorial/lists.md+1−1
@@ -13,7 +13,7 @@ So a list can be either null or non-null. When the list contains only `~` and no
13
13
14`[1 [2 [3 [4 ~]]]]`
14`[1 [2 [3 [4 ~]]]]`
15
15
16−It's easy to see where the heads are and where the nesting tails are. The head of the above list is the atom `1` and the tail is the list `[2 [3 [4 ~]]]`, (or `[2 3 4]`). Recall that whenever cell brackets are omitted so that visually there appears to be more than two child nouns, it is implicitly understood that the right-most nouns constitute a cell.
16+It's easy to see where the heads are and where the nesting tails are. The head of the above list is the atom `1` and the tail is the list `[2 [3 [4 ~]]]`, (or `[2 3 4 ~]`). Recall that whenever cell brackets are omitted so that visually there appears to be more than two child nouns, it is implicitly understood that the right-most nouns constitute a cell.
17
17
18To make a list, let's cast nouns to the `(list @)` ("list of atoms") type.
18To make a list, let's cast nouns to the `(list @)` ("list of atoms") type.
19
19
learn/hoon/hoon-tutorial/type-checking-and-type-inference.md+1−1
@@ -167,7 +167,7 @@ Cast runes also shape how Hoon understands an expression type. The inferred typ
167^+([0x1b 0b11] [0x123 0b101]) [@ux @ub]
167^+([0x1b 0b11] [0x123 0b101]) [@ux @ub]
168```
168```
169
169
170−You can also use the irregular `\` \`` syntax for casting in the same way as `^-`; e.g., `\`@\`123` for `^-(@ 123)`.
170+You can also use the irregular `` ` `` syntax for casting in the same way as `^-`; e.g., `` `@`123 `` for `^-(@ 123)`.
171
171
172One thing to note about casts is that they can 'throw away' type information. The second subexpression of `^-` and `^+` casts may be inferred to have a very specific type. If the cast type is more general, then the more specific type information is lost. Consider the literal `[12 14]`. The inferred type of this expression is `[@ @]`, i.e., a cell of two atoms. If we cast over `[12 14]` with `^-(^ [12 14])` then the inferred type is just `^`, the set of all cells. The information about what kind of cell it is has been thrown away. If we cast over `[12 14]` with `^-(* [12 14])` then the inferred type is `*`, the set of all nouns. All interesting type information is thrown away on the latter cast.
172One thing to note about casts is that they can 'throw away' type information. The second subexpression of `^-` and `^+` casts may be inferred to have a very specific type. If the cast type is more general, then the more specific type information is lost. Consider the literal `[12 14]`. The inferred type of this expression is `[@ @]`, i.e., a cell of two atoms. If we cast over `[12 14]` with `^-(^ [12 14])` then the inferred type is just `^`, the set of all cells. The information about what kind of cell it is has been thrown away. If we cast over `[12 14]` with `^-(* [12 14])` then the inferred type is `*`, the set of all nouns. All interesting type information is thrown away on the latter cast.
173
173
reference/hoon-expressions/rune/zap.md+1−1
@@ -25,7 +25,7 @@ In Hoon, a dynamic type is a static type compiled at runtime. This type-noun ce
25
25
26```
26```
27> !>(1)
27> !>(1)
28−[p=#t/@ud q=1]
28+[#t/@ud q=1]
29```
29```
30
30
31If you want just the type value, use a 'type spear'. This is `-:!>`, i.e., the head of the cell produced by `!>`:
31If you want just the type value, use a 'type spear'. This is `-:!>`, i.e., the head of the cell produced by `!>`:
using/sail-and-udon.md+10−16
@@ -1053,15 +1053,11 @@ bug.
1053
1053
1054#### Inline Code Literal
1054#### Inline Code Literal
1055
1055
1056−Enclosing some text in
1057−```
1058−`
1059−```
1060−characters will cause it to be displayed as code,
1056+Enclosing some text in `` ` `` characters will cause it to be displayed as code,
1061inside a `<code>` HTML element with monospace font and highlighted with a
1057inside a `<code>` HTML element with monospace font and highlighted with a
1062different background color.
1058different background color.
1063
1059
1064−Using `` ` \`` is useful when you want to designated only part of a line as code.
1060+Using `` ` `` is useful when you want to designated only part of a line as code.
1065Since this page is written in Udon, we've been using this operation
1061Since this page is written in Udon, we've been using this operation
1066throughout this guide to `format text` to distinguish code from prose.
1062throughout this guide to `format text` to distinguish code from prose.
1067
1063
@@ -1097,16 +1093,14 @@ Most of our examples so far have used.
1097**Example:**
1093**Example:**
1098
1094
1099
1095
1100−```
1096+ ```
1101− ```
1102− (def Y (fn [f]
1097+ (def Y (fn [f]
1103− ((fn [x]
1098+ ((fn [x]
1104− (x x))
1099+ (x x))
1105− (fn [x]
1100+ (fn [x]
1106− (f (fn [y]
1101+ (f (fn [y]
1107− ((x x) y)))))))
1102+ ((x x) y)))))))
1108− ```
1109−```
1103+ ```
1110
1104
1111**Produces:**
1105**Produces:**
1112
1106