on master help sign in
Add lookup table for irregular forms.
commit3c4536ebb5002912a5d11f5a58a1ce23e44dd56a authorSigilante <TheQuestionExtraordinary@protonmail.com> dateFri 14 Jan 2022, 14:12 (5 years ago) parentbac1e1e
1 file changed+29
content/docs/hoon/reference/irregular.md+29
content/docs/hoon/reference/irregular.md+29
@@ -5,6 +5,35 @@ template = "doc.html"
55aliases = ["docs/reference/hoon-expressions/irregular/"]
66+++
77
8+## Quick Lookup of Irregular Forms
9+
10+| Form | Regular Form |
11+| ---- | ------------ |
12+| `_foo` | [`$_`](https://urbit.org/docs/hoon/reference/rune/buc#_-buccab), normalizes to an example |
13+| `[a=foo b=bar c=baz]` | [`$:`](https://urbit.org/docs/hoon/reference/rune/buc#_-buccol), forms a tuple |
14+| `foo=bar` | [`$=`](https://urbit.org/docs/hoon/reference/rune/buc#_-buctis), wraps a face around a value |
15+| `?($foo $bar $baz)` | [`$?`](https://urbit.org/docs/hoon/reference/rune/buc#_-bucwut), forms a type union |
16+| `(fun arg)` | [`%-`](https://urbit.org/docs/hoon/reference/rune/cen#_-cenhep), calls a gate |
17+| `~(arm core arg)` | [`%~`](https://urbit.org/docs/hoon/reference/rune/cen#_-censig), pulls an arm in a door |
18+| `foo(x 1, y 2, z 3)` | [`%=`](https://urbit.org/docs/hoon/reference/rune/cen#_-centis), resolve a wing with changes |
19+| `[a b]` | [`:-`](https://urbit.org/docs/hoon/reference/rune/col#_-colhep), constructs 2-tuple |
20+| `[a b c]` | [`:+`](https://urbit.org/docs/hoon/reference/rune/col#_-collus), constructs 3-tuple |
21+| `[a b c d]` | [`:^`](https://urbit.org/docs/hoon/reference/rune/col#_-colket), constructs 4-tuple |
22+| `[a b c d e …]` | [`:*`](https://urbit.org/docs/hoon/reference/rune/col#_-coltar), constructs _n_-tuple |
23+| `~[a b c]` | [`:~`](https://urbit.org/docs/hoon/reference/rune/col#_-colsig), constructs null-terminated list |
24+| `+(42)` | [`.+`](https://urbit.org/docs/hoon/reference/rune/dot#_-dotlus), increments with Nock 4 |
25+| `=(a b)` | [`.=`](https://urbit.org/docs/hoon/reference/rune/dot#_-dottis), tests for equality wiht Nock 5 |
26+| `` `foo`bar `` | [`^-`](https://urbit.org/docs/hoon/reference/rune/ket#_-kethep), typecasts by explicit type label |
27+| `foo=bar` | [`^=`](https://urbit.org/docs/hoon/reference/rune/ket#_-kettis), binds name to value |
28+| `*foo` | [`^*`](https://urbit.org/docs/hoon/reference/rune/ket#_-kettar), bunts (produces default mold value) |
29+| `,foo` | [`^:`](https://urbit.org/docs/hoon/reference/rune/ket#_-ketcol), produces “factory” gate for type |
30+| `:(fun a b c d)` | [`;:`](https://urbit.org/docs/hoon/reference/rune/mic#_-miccol), calls binary function as _n_-ary function |
31+| `foo:bar` | [`=<`](https://urbit.org/docs/hoon/reference/rune/tis#_-tisgal), composes two expressions, inverted |
32+| `|(foo bar baz)` | [`?|`](https://urbit.org/docs/hoon/reference/rune/wut#_-wutbar), logical OR (loobean) |
33+| `&(foo bar baz)` | [`?&`](https://urbit.org/docs/hoon/reference/rune/wut#_-wutpam), logical AND (loobean) |
34+| `!foo` | [`?!`](https://urbit.org/docs/hoon/reference/rune/wut#_-wutzap), logical NOT (loobean) |
35+| `;html` | Sail builder |
36+
837##### Reading guide
938
1039Headings contain runes, phonetics and tokens. Description contains a link to the