on master help sign in
docs for /. and minor improvement to previous docs
commit1f14f08f2eb0c6a365f7cb66da545840b2aed9f0 authorTed Blackman <ted@tlon.io> dateTue 5 Sep 2017, 17:13 (9 years ago) parent9d57a53
1 file changed+24−1
docs/arvo/internals/ford/runes.md+24−1
docs/arvo/internals/ford/runes.md+24−1
@@ -144,7 +144,8 @@ produces the number of bytes in the file "/path/to/hoon/file."
144144### `/,` switch by path
145145
146146`/,` is a switch statement, which picks a branch to evaluate based on
147−whether the current path matches the path in the switch statement.
147+whether the current path matches the path in the switch statement.
148+Takes a sequence of pairs of (path, horn) terminated by a `==`.
148149
149150Example:
150151```
@@ -155,7 +156,29 @@ Example:
155156 /another-wrong-path /~ ~
156157 /right-path /~ %evaluate-me :: only evaluate this horn
157158 ==
159+::
158160`@t`just-right
159161```
160162
161163produces: `'evaluate-me'`
164+
165+### `/.` list
166+
167+Produce a null-terminated list from a sequence of horns, terminated by a `==`.
168+
169+Example:
170+```
171+/= vanes
172+ /.
173+ /~ %ames
174+ /~ %behn
175+ /~ %clay
176+ /~ %dill
177+ /~ %eyre
178+ /~ %ford
179+ /~ %gall
180+ ==
181+::
182+vanes
183+```
184+produces: `[%ames %behn %clay %dill %eyre %ford %gall ~]`.