@@ -55,10 +55,45 @@ that horn, and wraps a face around it.
5555Example:
5656```
5757/= foo /~ [a=0 b=1]
58+::
5859[a.foo b.foo]
5960```
6061produces: `[0 1]`
6162
63+### `/:` evaluate at path, and `/<mark>/` render mark at current path
64+
65+`/:` takes a path and a horn, and evaluates the horn with the current path set to the supplied path.
66+`/mar/` renders the mark 'mar' at the current path.
67+
68+Example:
69+```
70+/= hoo-source /: /path/to/hoon-file /hoon/
71+::
72+`@t`hoo-source
73+```
74+
75+produces the text of the hoon file at "/path/to/hoon-file/hoon".
76+
77+`/hoon/` renders the current path using the `%hoon` mark, which in this case
78+passes the contents through unchanged. In general, rendering a file with a
79+mark will potentially run the contents through a series of conversion
80+operations. For details on marks, see the
81+[marks docs](https://urbit.org/docs/arvo/marks).
82+
83+Here's an example that includes a mark conversion:
84+```
85+/= page /: /path/to/html/file /mime/
86+::
87+page
88+
89+:: contents of /path/to/html/file:
90+<html><head><title>My Fascinating Blog</title></head></html>
91+```
92+produces: `[[%text %html ~] 37 '<html><body><div></div></body></html>']`
93+
94+This result includes the MIME type ('text/html'), the content length in bytes,
95+and the HTML itself.
96+
6297### `/_` run a horn on each file in the current directory
6398
6499`/_` takes a horn as an argument. It produces a new horn representing the
@@ -70,6 +105,7 @@ the file.
70105Example:
71106```
72107/= kids /_ /hoon/
108+::
73109`(map term cord)`kids
74110```
75111
@@ -77,31 +113,30 @@ produces a value of type `(map term cord)`, where each key is the basename (the
77113filename without the prefix), and each value is the result of running the
78114contents of the file through the `%hoon` mark, which validates that it's valid
79115hoon code and returns it unmodified. So, the resulting map associates basenames
80−with file contents. For more information on marks, see the docs for the
81−`/<mark>/` syntax.
82−
83−### `/:` evaluate at path
84−
85−`/:` takes a path and a horn, and evaluates the horn with the current path set to the supplied path.
86−
87−Example:
88−```
89−/= hoo-source /: /path/to/hoon-file /hoon/
90−`@t`hoo-source
91−```
92−
93−produces the text of the hoon file at "/path/to/hoon-file/hoon".
116+with file contents.
94117
95118### `/;` operate on
96119
97120`/;` takes a twig and a horn. The twig should evaluate to a gate, which is then slammed
98−with the result of the horn.
121+with the result of the horn as its sample.
99122
100123Example:
101−
102124```
103−/= goo /; |=({a/@ b/@} +(b)) /~ [a=0 b=1]
125+/= goo
126+ /; |=({a/@ b/@} +(b))
127+ /~ [a=0 b=1]
128+::
104129goo
105130```
106131
132+Here's a slightly more complex example with runes that use the filesystem:
133+```
134+/= file-length
135+ /; |=(a/@t (lent (crip a)))
136+ /: /path/to/hoon/file /hoon/
137+::
138+file-length
139+```
140+produces the number of bytes in the file "/path/to/hoon/file."
141+
107142produces: `2`