@@ -55,10 +55,45 @@ that horn, and wraps a face around it.
57/= foo /~ [a=0 b=1]
57/= foo /~ [a=0 b=1]
58[a.foo b.foo]
59[a.foo b.foo]
60produces: `[0 1]`
61produces: `[0 1]`
63+### `/:` evaluate at path, and `/<mark>/` render mark at current path
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.
70+/= hoo-source /: /path/to/hoon-file /hoon/
75+produces the text of the hoon file at "/path/to/hoon-file/hoon".
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).
83+Here's an example that includes a mark conversion:
85+/= page /: /path/to/html/file /mime/
89+:: contents of /path/to/html/file:
90+<html><head><title>My Fascinating Blog</title></head></html>
92+produces: `[[%text %html ~] 37 '<html><body><div></div></body></html>']`
94+This result includes the MIME type ('text/html'), the content length in bytes,
62### `/_` run a horn on each file in the current directory
97### `/_` run a horn on each file in the current directory
64`/_` takes a horn as an argument. It produces a new horn representing the
99`/_` takes a horn as an argument. It produces a new horn representing the
@@ -70,6 +105,7 @@ the file.
72/= kids /_ /hoon/
107/= kids /_ /hoon/
73`(map term cord)`kids
109`(map term cord)`kids
@@ -77,31 +113,30 @@ produces a value of type `(map term cord)`, where each key is the basename (the
77filename without the prefix), and each value is the result of running the
113filename without the prefix), and each value is the result of running the
78contents of the file through the `%hoon` mark, which validates that it's valid
114contents of the file through the `%hoon` mark, which validates that it's valid
79hoon code and returns it unmodified. So, the resulting map associates basenames
115hoon 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
116+with file contents.
83−### `/:` evaluate at path
85−`/:` takes a path and a horn, and evaluates the horn with the current path set to the supplied path.
89−/= hoo-source /: /path/to/hoon-file /hoon/
93−produces the text of the hoon file at "/path/to/hoon-file/hoon".
95### `/;` operate on
118### `/;` operate on
97`/;` takes a twig and a horn. The twig should evaluate to a gate, which is then slammed
120`/;` 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.
126+ /; |=({a/@ b/@} +(b))
103−/= goo /; |=({a/@ b/@} +(b)) /~ [a=0 b=1]
127+ /~ [a=0 b=1]
132+Here's a slightly more complex example with runes that use the filesystem:
135+ /; |=(a/@t (lent (crip a)))
136+ /: /path/to/hoon/file /hoon/
140+produces the number of bytes in the file "/path/to/hoon/file."
107produces: `2`
142produces: `2`