on master help sign in
Merge pull request #1176 from urbit/ketcol-syntax

ketcol syntax

commit7802dc830736e28aacea0c99fc5b8c32d7c3315f authorpoprox <51337059+drbeefsupreme@users.noreply.github.com> dateMon 4 Oct 2021, 16:34 (5 years ago) parent2ce781a0b876ed
1 file changed+12−3
content/docs/hoon/reference/rune/ket.md+12−3
content/docs/hoon/reference/rune/ket.md+12−3
@@ -63,9 +63,18 @@ Regular: **1-fixed**.
6363
6464##### Discussion
6565
66−A mold is an idempotent gate that is guaranteed to produce a noun of that type. If an input value isn't of the correct type, the bunt value of that type is returned. (See `^*`.)
67−
68−`^:` is used to produce a gate that is much like a mold, except that instead of producing a bunt value when the input value is of the wrong type, it crashes.
66+A mold is an idempotent gate that is guaranteed to produce a noun of that type.
67+If an input value isn't of the correct type, the bunt value of that type is
68+returned. (See `^*`.)
69+
70+`^:` is used to produce a gate that is much like a mold, except that instead of
71+producing a bunt value when the input value is of the wrong type, it crashes.
72+
73+One may expect that `^:(path /foo)` would result in a syntax error since `^:`
74+only takes one child, but instead it will parse as `=< ^ %:(path /foo)`. Since
75+`:` is the irregular syntax for `=<` this is is parsed as "get `^` (i.e. the
76+mold for cells) from a subject of `(path /foo)`", with `:` being the irregular
77+syntax for `=<`.
6978
7079##### Examples
7180