on master help sign in
updates conditionals
6bf56aaRobert
learn/hoon/hoon-tutorial/conditionals.md+2−2
@@ -41,7 +41,7 @@ But now let's get into the conditionals themselves. Below we'll examine the seri
41
41
42`?:` (pronounced "wut-col") is the simplest "wut" rune. It takes three children, also called sub-expressions. The first child is a boolean test, which means that it looks for a `%.y` ("yes") or a `%.n` ("no."). The second child is a yes-branch, which is what we arrive at if the aforementioned boolean test evaluates to `%.y`. The third child is a no-branch, so we arrive at it if instead the boolean test evaluates to `%.n`. These branches can contain any sort of Hoon expression, including further conditional expressions, as we will see.
42`?:` (pronounced "wut-col") is the simplest "wut" rune. It takes three children, also called sub-expressions. The first child is a boolean test, which means that it looks for a `%.y` ("yes") or a `%.n` ("no."). The second child is a yes-branch, which is what we arrive at if the aforementioned boolean test evaluates to `%.y`. The third child is a no-branch, so we arrive at it if instead the boolean test evaluates to `%.n`. These branches can contain any sort of Hoon expression, including further conditional expressions, as we will see.
43
43
44−In our case, the first child of `?:` is `?& =(0 (mod n 2))`. It itself has another conditional rune, `?&` ("wut-pam"), which performs the logical "and" operation on its two children, making sure that both of them are true. The first expression that our `?&` rune uses is:
44+In our case, the first child of `?:` is `?& =(0 (mod n 2))`. It itself has another conditional rune, `?&` ("wut-pam"), which performs the logical "and" operation on its two children, making sure that both of them are true. The first child of our `?&` rune is:
45
45
46```
46```
47=(0 (mod n 2))
47=(0 (mod n 2))
@@ -49,7 +49,7 @@ In our case, the first child of `?:` is `?& =(0 (mod n 2))`. It itself has anot
49
49
50which simply asks if `n` is even or not.
50which simply asks if `n` is even or not.
51
51
52−The second expression is:
52+The second child is:
53
53
54```
54```
55 ?& (gte n 1)
55 ?& (gte n 1)