@@ -1,5 +1,5 @@
2−title = "Gates (Hoon Functions)"
2+title = "1.5 Gates (Hoon Functions)"
4template = "doc.html"
4template = "doc.html"
@@ -68,8 +68,6 @@ The gate works as promised -- it takes any number `n` and returns `n + 1`. Let'
69We 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).
69We 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).
71−When 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.
73In 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.
71In 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.
75In `inc`, the product is defined by `(add 1 a)`. There's not much to it -- it returns the value of `a + 1`!
73In `inc`, the product is defined by `(add 1 a)`. There's not much to it -- it returns the value of `a + 1`!