@@ -492,6 +492,16 @@ Again, being able to read Nock is not essential to understanding Hoon.
493Let'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.
493Let'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.
495+We can use this to set the context of cores. For example:
497+~zod:dojo> =>([1 2] |=(@ 15))
500+Here we have created a gate that takes in an `@` and returns `15` with `[1 2]`
503+`=>` (and its reversed version `=<`) are used extensively to put cores into the
504+context of other cores.
@@ -505,7 +515,14 @@ Let's take a quick look at how cores can be combined with `=>` to build up large
505 (mul (foo a) 2)
515 (mul (foo a) 2)
508−In this core, `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.
518+At 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.
520+It is also helpful to think about what is happening on the level of cores here.
521+The `=>` here sets the context of the core containing `+bar` to be the core
522+containing `+foo`. Recall that arms are evaluated with the parent core as the
523+subject. Thus `+bar` is evaluated with the core containing it as the subject,
524+which has the core containing `+foo` in its context. So this is why `+foo` is in
525+the scope of `+bar` but not vice versa.
510Let's take a look inside of `hoon.hoon`, where the standard library is located, to see how this is being used.
527Let's take a look inside of `hoon.hoon`, where the standard library is located, to see how this is being used.
@@ -606,7 +623,9 @@ Lastly, let's check the subject of the last arm in `hoon.hoon` (as of November 2
606This confirms for us, then, that `hoon.hoon` consists of six nested cores, with the `hoon-version` core at the top.
623This confirms for us, then, that `hoon.hoon` consists of six nested cores, with the `hoon-version` core at the top.
608#### Exercise 1.7a
625#### Exercise 1.7a
609−Pick a couple of arms in `hoon.hoon` and check to make sure that they are only referenced in the layer they exist in or a deeper layer. This is easily accomplished with `Ctrl-F`.
626+Pick a couple of arms in `hoon.hoon` and check to make sure that they are only
627+referenced in its parent core or core(s) that have the parent core put in its
628+context via the `=>` or `=<` runes.