on master help sign in
Minor language fixes to generators.udon
7f51336David Kerschner
learn/arvo/arvo-internals/generators.udon+6−6
@@ -18,7 +18,7 @@ There are four kinds of generators: naked, `%say`, `%get`, and `%ask`.
18### Naked Generators
18### Naked Generators
19
19
20A naked generator is simply a `gate`; that is, an is an anonymous function that
20A naked generator is simply a `gate`; that is, an is an anonymous function that
21−takes a `sample` (argument) and produces a noun. All you need to do is write a
21+takes a `sample` (argument) and produces a noun. All you need to do is to write a
22`gate` and put it into file in the `/gen` directory. Let's take a look at a very
22`gate` and put it into file in the `/gen` directory. Let's take a look at a very
23simple one:
23simple one:
24
24
@@ -36,7 +36,7 @@ we can run it from the [Dojo](/docs/using/shell):
3642
3642
37```
37```
38
38
39−This command just pass in 42 and get 42 back. But what about when we pass in
39+This command just passes in 42 and gets 42 back. But what about when we pass in
40`"asdf"`?
40`"asdf"`?
41
41
42```
42```
@@ -58,7 +58,7 @@ as part of a `tape`, the `cord` is only a single character. So each atom in the
58`a`, 115 is `s`, 100 is `d`, 102 is `f`, and `0` is the "null" that every list
58`a`, 115 is `s`, 100 is `d`, 102 is `f`, and `0` is the "null" that every list
59is terminated with.
59is terminated with.
60
60
61−We can tell the Dojo to "cast" -- apply a specific type to -- the output of our
61+We can tell the Dojo to cast -- apply a specific type to -- the output of our
62generator see something more familiar:
62generator see something more familiar:
63
63
64```
64```
@@ -66,7 +66,7 @@ generator see something more familiar:
66"asdf"
66"asdf"
67```
67```
68
68
69−Now let's create a generator with two samples instead of one. Save the code
69+Now let's create a generator with two arguments instead of one. Save the code
70below as `add.hoon` in the `/gen` directory.
70below as `add.hoon` in the `/gen` directory.
71
71
72```
72```
@@ -135,7 +135,7 @@ generator.
135Recall that the rune `:-` produces a cell, with the first following expression
135Recall that the rune `:-` produces a cell, with the first following expression
136as its head and the second following expression as its tail.
136as its head and the second following expression as its tail.
137
137
138−The expression above, then, creates a cell with `%say` as the head. The tail is
138+The expression above creates a cell with `%say` as the head. The tail is
139the `|= *` expression on the line that follows.
139the `|= *` expression on the line that follows.
140
140
141```
141```
@@ -163,7 +163,7 @@ in the gate's sample, which we only specified as `*` in the previous few
163examples. But we can do more with `%say` generators if we do more with that
163examples. But we can do more with `%say` generators if we do more with that
164sample. Any valid sample will follow this 3-tuple scheme:
164sample. Any valid sample will follow this 3-tuple scheme:
165
165
166−`[[datetime, entropy, and beak] [list of unnamed arguments] [list of named arguments]]`
166+`[[datetime, entropy, beak] [list of unnamed arguments] [list of named arguments]]`
167
167
168This entire structure is a noun, which is why `*` is a valid sample if we
168This entire structure is a noun, which is why `*` is a valid sample if we
169wish to not use any of the information here in a generator. But let's look at
169wish to not use any of the information here in a generator. But let's look at