@@ -99,7 +99,7 @@ First let's use the dojo to bind the face `a` to the value `12`, and the face `b
100Now use the following multi-line expression to bind `c` to a core. As before, feel free to cut and paste the following expression into the dojo (starting at `=c`):
100Now use the following multi-line expression to bind `c` to a core. As before, feel free to cut and paste the following expression into the dojo (starting at `=c`):
105 ++ inc (add 1 a)
105 ++ inc (add 1 a)
@@ -215,7 +215,7 @@ The result is a tree of uncomputed Nock formulas. But you virtually never need
216To get the arm of a core to compute you must use its name. The arm names of `c` are in the expression used to create `c`:
216To get the arm of a core to compute you must use its name. The arm names of `c` are in the expression used to create `c`:
221 ++ inc (add 1 a)
221 ++ inc (add 1 a)
@@ -490,14 +490,20 @@ Again, being able to read Nock is not essential to understanding Hoon.
491### Core Nesting
491### Core Nesting
493+Let's take a quick look at how cores can be combined with `=>` to build up
493−Let's take a quick look at how cores can be combined with `=>` to build up larger structures. `=> p=hoon q=hoon` allows you to take the product of `q` with the product of `p` taken as the subject.
494+larger structures. `=> p=hoon q=hoon` yields the product of `q` with the product of `p` taken as the subject.
495−We can use this to set the context of cores. For example:
496+We can use this to set the context of cores. Recall that the payload of a gate
497+is a cell of `[sample context]`. For example:
497−~zod:dojo> =>([1 2] |=(@ 15))
499+~zod:dojo> =foo =>([1 2] |=(@ 15))
498−<1.fed {@ @ud @ud}>
500+> +3:foo
500−Here we have created a gate with `[1 2]` as its context that takes in an `@` and returns `15`.
503+Here we have created a gate with `[1 2]` as its context that takes in an `@` and
504+returns `15`. `+3:foo` shows the payload of the core to be `[0 [1 2]]`. Here `0`
505+is the default value of `@` and is the sample, while `[1 2]` is the context that
502`=>` (and its reversed version `=<`) are used extensively to put cores into the
508`=>` (and its reversed version `=<`) are used extensively to put cores into the
503context of other cores.
509context of other cores.
@@ -516,8 +522,7 @@ context of other cores.
517At the level of arms, `+foo` is in the subject of `+bar`, and so `+bar` is able to call `+foo`. On the other hand, `+bar` is not in the subject of `+foo`, so `+foo` cannot call `+bar` - you will get a `-find.bar` error.
523At the level of arms, `+foo` is in the subject of `+bar`, and so `+bar` is able to call `+foo`. On the other hand, `+bar` is not in the subject of `+foo`, so `+foo` cannot call `+bar` - you will get a `-find.bar` error.
519−It is also helpful to think about what is happening on the level of cores here.
520−The `=>` here sets the context of the core containing `+bar` to be the core
525+At the level of cores, the `=>` sets the context of the core containing `+bar` to be the core
521containing `+foo`. Recall that arms are evaluated with the parent core as the
526containing `+foo`. Recall that arms are evaluated with the parent core as the
522subject. Thus `+bar` is evaluated with the core containing it as the subject,
527subject. Thus `+bar` is evaluated with the core containing it as the subject,
523which has the core containing `+foo` in its context. So this is why `+foo` is in
528which has the core containing `+foo` in its context. So this is why `+foo` is in
@@ -569,12 +574,13 @@ and so on, down to
569 $@(~ [~ u=item])
574 $@(~ [~ u=item])
572−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/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`.
575<41.mac 1.ane $141>
580<41.mac 1.ane $141>
577−Now though, we see that the section 1 core is contained within the core containing `hoon-version`.
582+Here we see that core containing `hoon-version` is in the subject of the
579Next, [section two](@/docs/reference/library/2a.md) starts:
585Next, [section two](@/docs/reference/library/2a.md) starts:
@@ -619,7 +625,9 @@ Lastly, let's check the subject of the last arm in `hoon.hoon` (as of November 2
619> ..pi-tell
625> ..pi-tell
620<92.nnn 247.tye 51.mvt 126.xjf 41.mac 1.ane $141>
626<92.nnn 247.tye 51.mvt 126.xjf 41.mac 1.ane $141>
622−This confirms for us, then, that `hoon.hoon` consists of six nested cores, with the `hoon-version` core at the top.
628+This confirms for us, then, that `hoon.hoon` consists of six nested cores, with one
629+inside the payload of the next, with
630+the `hoon-version` core most deeply nested.
624#### Exercise 1.7a
632#### Exercise 1.7a
625Pick a couple of arms in `hoon.hoon` and check to make sure that they are only
633Pick a couple of arms in `hoon.hoon` and check to make sure that they are only