@@ -129,6 +129,8 @@ Example:
132Here's a slightly more complex example with runes that use the filesystem:
134Here's a slightly more complex example with runes that use the filesystem:
134/= file-length
136/= file-length
@@ -139,4 +141,21 @@ file-length
140produces the number of bytes in the file "/path/to/hoon/file."
142produces the number of bytes in the file "/path/to/hoon/file."
144+### `/,` switch by path
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.
152+ /: /right-path :: set path to /right-path
155+ /another-wrong-path /~ ~
156+ /right-path /~ %evaluate-me :: only evaluate this horn
142−produces: `2`
161+produces: `'evaluate-me'`