on master help sign in
list, inline code tic rendering, and zapgar output fixes
commit1f9ead829006db243ee35fbd8dd0f951afe76ac3 authorJohn Franklin <jfranklin9000@gmail.com> dateWed 31 Jul 2019, 01:23 (7 years ago) parent21c76eb
4 files changed+13−19
learn/hoon/hoon-tutorial/lists.md+1−1 learn/hoon/hoon-tutorial/type-checking-and-type-inference.md+1−1 reference/hoon-expressions/rune/zap.md+1−1 using/sail-and-udon.md+10−16
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
1313
1414`[1 [2 [3 [4 ~]]]]`
1515
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.
1717
1818To make a list, let's cast nouns to the `(list @)` ("list of atoms") type.
1919
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
167167^+([0x1b 0b11] [0x123 0b101]) [@ux @ub]
168168```
169169
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)`.
171171
172172One 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.
173173
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
2525
2626```
2727> !>(1)
28−[p=#t/@ud q=1]
28+[#t/@ud q=1]
2929```
3030
3131If 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.
10531053
10541054#### Inline Code Literal
10551055
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,
10611057inside a `<code>` HTML element with monospace font and highlighted with a
10621058different background color.
10631059
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.
10651061Since this page is written in Udon, we've been using this operation
10661062throughout this guide to `format text` to distinguish code from prose.
10671063
@@ -1097,16 +1093,14 @@ Most of our examples so far have used.
10971093**Example:**
10981094
10991095
1100−```
1101− ```
1102− (def Y (fn [f]
1103− ((fn [x]
1104− (x x))
1105− (fn [x]
1106− (f (fn [y]
1107− ((x x) y)))))))
1108− ```
1109−```
1096+ ```
1097+ (def Y (fn [f]
1098+ ((fn [x]
1099+ (x x))
1100+ (fn [x]
1101+ (f (fn [y]
1102+ ((x x) y)))))))
1103+ ```
11101104
11111105**Produces:**
11121106