@@ -55,7 +55,7 @@ Like all arms, `$` is computed with its parent core as the subject. When `$` is
55Let's make a gate that takes any unsigned integer (i.e., an atom) as its sample and returns that value plus one as the product. To do this we'll use the `|=` rune. We'll bind this gate to the face `inc` for 'increment':
55Let's make a gate that takes any unsigned integer (i.e., an atom) as its sample and returns that value plus one as the product. To do this we'll use the `|=` rune. We'll bind this gate to the face `inc` for 'increment':
58−> =inc |=(a=@ (add 1 a))
58+> =inc |=(a=@ +(a))
@@ -71,13 +71,13 @@ The gate works as promised -- it takes any number `n` and returns `n + 1`. Let'
72### The `|=` Rune
72### The `|=` Rune
74−We typically use the `|=` rune to create a gate. In the expression above the `|=` is immediately followed by a set of parentheses containing two subexpressions: `a=@` and `(add 1 a)`. The first defines the gate's sample (input value type), and the second defines the gate's product (value).
74+We typically use the `|=` rune to create a gate. In the expression above the `|=` is immediately followed by a set of parentheses containing two subexpressions: `a=@` and `+(a)`. The first defines the gate's sample (input value type), and the second defines the gate's product (value).
76When we used the `|%` rune in the last lesson we didn't use parentheses because we were writing in "tall form" syntax, whereas here we are writing in "flat form" syntax. (The latter uses parentheses and is more suitable for shorter snippets of code.) We'll explain these concepts more thoroughly in lesson 2.2.
76When we used the `|%` rune in the last lesson we didn't use parentheses because we were writing in "tall form" syntax, whereas here we are writing in "flat form" syntax. (The latter uses parentheses and is more suitable for shorter snippets of code.) We'll explain these concepts more thoroughly in lesson 2.2.
78In the example gate above, `inc`, the sample is defined by `a=@`. This means that the sample is defined as an atom, `@`, meaning that the gate will take as input anything of that type. The sample is given the face `a`. With the face it's easier to refer to the sample in later code, if desired.
78In the example gate above, `inc`, the sample is defined by `a=@`. This means that the sample is defined as an atom, `@`, meaning that the gate will take as input anything of that type. The sample is given the face `a`. With the face it's easier to refer to the sample in later code, if desired.
80−In `inc`, the product is defined by `(add 1 a)`. There's not much to it -- it returns the value of `a + 1`!
80+In `inc`, the product is defined by `+(a)`. There's not much to it -- it returns the value of `a + 1`!
82The second subexpression after the `|=` rune is used to build the gate's `$` arm. That's where all the computations go.
82The second subexpression after the `|=` rune is used to build the gate's `$` arm. That's where all the computations go.