on master help sign in
Fix typos in the libraries tutorial

- In the `make-deck` walkthrough, I changed `j` to loop from 2 to 14 to correctly reflect the original code. - In the `shuffle-deck` walkthrough, I changed the description of `=^` to be more clear. Originally, it said "changes the leg with a tail", which doesn't make much sense. I changed this to say "changes a leg in the subject with the tail". - The `shuffle-deck` walkthrough also said that the code used the `%^` rune for recursion. I changed this to `%=` to match the code.

commitda6301d0655c98eaf1b01f1c3e7331ef91e4601b authorAlec Brickner <alecjbrick@gmail.com> dateMon 25 May 2020, 11:14 (6 years ago) parent124fb10
1 file changed+4−4
tutorials/hoon/libraries.md+4−4
tutorials/hoon/libraries.md+4−4
@@ -103,9 +103,9 @@ The `?+` rune is the rune to switch against a value with a default. The default
103103 |-
104104 ?: (gth i 4)
105105 mydeck
106− =/ j 1
106+ =/ j 2
107107 |-
108− ?. (lte j 13)
108+ ?. (lte j 14)
109109 ^$(i +(i))
110110 %= $
111111 j +(j)
@@ -153,9 +153,9 @@ Next, with `=/ random ~(. og entropy)`, we feed the `og` core the entropy it n
153153
154154`?: =(remaining 1)` checks if have only one card remaining. If that's true, we produce a cell of `shuffled` and the one card left in `unshuffled`. We use the `:_` rune here, so that the "heavier" hoon is at the bottom of the expression.
155155
156−If the above conditional evaluates to false, we are going to do a little work. `=^` is a rune that pins the head of a pair and changes the leg with a tail. It's useful for interacting with the `og` core arms, as many of them produce a pair of a random numbers and the next state of the core. We're going to put the random number in the subject with the face `index` and change `random` to be the next core.
156+If the above conditional evaluates to false, we are going to do a little work. `=^` is a rune that pins the head of a pair and changes a leg in the subject with the tail. It's useful for interacting with the `og` core arms, as many of them produce a pair of a random numbers and the next state of the core. We're going to put the random number in the subject with the face `index` and change `random` to be the next core.
157157
158−With completed, we use `%^` to call `$` to recurse back up to `|-` with a few changes.
158+With completed, we use `%=` to call `$` to recurse back up to `|-` with a few changes.
159159
160160`shuffled` gets the `darc` from `unshuffled` at `index` added to the front of it.
161161