on master help sign in
remaining stdlib links
6ec04a9drbeefsupreme
hoon/hoon-school/arms-and-cores.md+1−1
@@ -574,7 +574,7 @@ and so on, down to
574 $@(~ [~ u=item])
574 $@(~ [~ u=item])
575--
575--
576```
576```
577−This core contains the arms in parts [1a-1c of the standard library documentation](@/docs/reference/library/1a.md). If you count them, there are 41 arms in the core from `++ add` down to `++ unit`. We again can see this fact reflected in the dojo by looking at the subject of `add`.
577+This core contains the arms in parts [1a-1c of the standard library documentation](@/docs/hoon/reference/stdlib/1a.md). If you count them, there are 41 arms in the core from `++ add` down to `++ unit`. We again can see this fact reflected in the dojo by looking at the subject of `add`.
578```
578```
579> ..add
579> ..add
580<41.mac 1.ane $141>
580<41.mac 1.ane $141>
hoon/hoon-school/libraries.md+9−1
@@ -124,7 +124,15 @@ The `?+` rune is the rune to switch against a value with a default. The default
124 (slag n d)
124 (slag n d)
125```
125```
126
126
127−`draw` takes two arguments: `n`, a number; and `d`, a `deck`. It's going to produce a cell of two `decks`. The cell is created using `scag` and `slag`. [`scag`](https://urbit.org/docs/reference/library/2b/#scag) is a standard-library gate produces the first `n` elements from a list, and [`slag`](https://urbit.org/docs/reference/library/2b/#slag) is a standard-library gate that produces the remaining elements of a list starting after the `n`th element. So we use `scag` to produce the drawn hand of `n` cards in the head of the cell as `hand`, and `slag` to produce the remaining deck in the tail of the cell as `rest`.
127+`draw` takes two arguments: `n`, a number; and `d`, a `deck`. It's going to
128+produce a cell of two `decks`. The cell is created using `scag` and `slag`.
129+[`scag`](@/docs/hoon/reference/stdlib/2b/#scag) is a
130+standard-library gate produces the first `n` elements from a list, and
131+[`slag`](@/docs/hoon/reference/stdlib/2b/#slag) is a
132+standard-library gate that produces the remaining elements of a list starting
133+after the `n`th element. So we use `scag` to produce the drawn hand of `n` cards
134+in the head of the cell as `hand`, and `slag` to produce the remaining deck in
135+the tail of the cell as `rest`.
128
136
129```hoon
137```hoon
130++ shuffle-deck
138++ shuffle-deck
hoon/hoon-school/list-of-numbers.md+1−1
@@ -107,7 +107,7 @@ $(count (add 1 count))
107
107
108The above code is, once again, a compact way of writing a rune expression. All you need to know is that this line of code restarts the program at `|-`, except with the value stored in `count` incremented by `1`. The construction of `(count (add 1 count))` tells the computer, "replace the value of `count` with `count+1`".
108The above code is, once again, a compact way of writing a rune expression. All you need to know is that this line of code restarts the program at `|-`, except with the value stored in `count` incremented by `1`. The construction of `(count (add 1 count))` tells the computer, "replace the value of `count` with `count+1`".
109
109
110−You'll notice that we use an unfamiliar word here: `add`. Unlike `count` and `end`, `add` is not defined anywhere in our program. That's because it's a gate that's predefined in the Hoon **standard library**. The standard library is filled with pre-defined gates that are generally useful, and these gates can be used just like something that you defined in your own program. You can see this gate, and other mathematical operators, in [section 1a](@/docs/reference/library/1a.md) of the standard library documentation.
110+You'll notice that we use an unfamiliar word here: `add`. Unlike `count` and `end`, `add` is not defined anywhere in our program. That's because it's a gate that's predefined in the Hoon **standard library**. The standard library is filled with pre-defined gates that are generally useful, and these gates can be used just like something that you defined in your own program. You can see this gate, and other mathematical operators, in [section 1a](@/docs/hoon/reference/stdlib/1a.md) of the standard library documentation.
111
111
112## Explanation
112## Explanation
113
113
hoon/hoon-school/lists.md+1−1
@@ -299,7 +299,7 @@ c
299
299
300## Using `hoon.hoon` to Learn Hoon
300## Using `hoon.hoon` to Learn Hoon
301
301
302−The Hoon standard library and compiler are written in Hoon. At this point, you know enough Hoon to be able to explore the standard library portions of `hoon.hoon` and find more functions relevant to lists. Look around in [section 2b](/docs/reference/library/2b/) (and elsewhere).
302+The Hoon standard library and compiler are written in Hoon. At this point, you know enough Hoon to be able to explore the standard library portions of `hoon.hoon` and find more functions relevant to lists. Look around in [section 2b](@/docs/hoon/reference/stdlib/2b.md) (and elsewhere).
303
303
304## Additional Exercises
304## Additional Exercises
305
305
hoon/hoon-school/trees-sets-and-maps.md+2−2
@@ -88,7 +88,7 @@ $(hay r.hay)
88
88
89## Sets
89## Sets
90
90
91−Use `set` to create a data structure for a set of values, e.g., `(set @)` for a set of atoms. The `in` [core](/docs/glossary/core/) in the Hoon standard library contains the various functions for operating on sets. See the standard library reference documentation for sets [here](@/docs/reference/library/2h.md).
91+Use `set` to create a data structure for a set of values, e.g., `(set @)` for a set of atoms. The `in` [core](/docs/glossary/core/) in the Hoon standard library contains the various functions for operating on sets. See the standard library reference documentation for sets [here](@/docs/hoon/reference/stdlib/2h.md).
92
92
93As with `list`s and `tree`s, there are two categories of sets: null `~`, and non-null. Hoon implements sets using trees for the underlying noun.
93As with `list`s and `tree`s, there are two categories of sets: null `~`, and non-null. Hoon implements sets using trees for the underlying noun.
94
94
@@ -237,7 +237,7 @@ Use `map` to create a set of key-value pairs, e.g., `(map @tas *)` for a set of
237
237
238One example use case is for storing customer information as a set of pairs: `(map [employee-name employee-data])`.
238One example use case is for storing customer information as a set of pairs: `(map [employee-name employee-data])`.
239
239
240−The `by` core in the Hoon standard library contains the various functions for operating on maps. Many of these functions are similar to the set functions of the `in` core. See the standard library reference documentation for maps [here](@/docs/reference/library/2i.md). As was the case with sets, the underlying noun of each map is a tree.
240+The `by` core in the Hoon standard library contains the various functions for operating on maps. Many of these functions are similar to the set functions of the `in` core. See the standard library reference documentation for maps [here](@/docs/hoon/reference/stdlib/2i.md). As was the case with sets, the underlying noun of each map is a tree.
241
241
242Two common methods for populating a map include (1) creating it from a list of key-value cells using the `my` function, and (2) inserting items into a map using the `put` arm of the `by` core.
242Two common methods for populating a map include (1) creating it from a list of key-value cells using the `my` function, and (2) inserting items into a map using the `put` arm of the `by` core.
243
243