on master help sign in
docs for /. and minor improvement to previous docs
1f14f08Ted Blackman
docs/arvo/internals/ford/runes.md+24−1
@@ -144,7 +144,8 @@ produces the number of bytes in the file "/path/to/hoon/file."
144### `/,` switch by path
144### `/,` switch by path
145
145
146`/,` is a switch statement, which picks a branch to evaluate based on
146`/,` 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 `==`.
148
149
149Example:
150Example:
150```
151```
@@ -155,7 +156,29 @@ Example:
155 /another-wrong-path /~ ~
156 /another-wrong-path /~ ~
156 /right-path /~ %evaluate-me :: only evaluate this horn
157 /right-path /~ %evaluate-me :: only evaluate this horn
157 ==
158 ==
159+::
158`@t`just-right
160`@t`just-right
159```
161```
160
162
161produces: `'evaluate-me'`
163produces: `'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 ~]`.