on master help sign in
updates conditionals
commitdccd27ff57c2a9255c9d43f97ff33af6eb1152c1 authorRobert <robert@tlon.io> dateFri 26 Jul 2019, 15:57 (7 years ago) parent6bf56aa
1 file changed+1−7
learn/hoon/hoon-tutorial/conditionals.md+1−7
learn/hoon/hoon-tutorial/conditionals.md+1−7
@@ -41,13 +41,7 @@ But now let's get into the conditionals themselves. Below we'll examine the seri
4141
4242`?:` (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.
4343
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−
46−```
47−=(0 (mod n 2))
48−```
49−
50−which simply asks if `n` is even or not.
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 `=(0 (mod n 2))`, which simply asks if `n` is even or not.
5145
5246The second child is:
5347