on master help sign in
modding by 2 checks if a number is even
commitb837b4549a8503db51185769dc76e38175058f27 authorsyzygyzer <jon@tlon.io> dateWed 20 Nov 2019, 15:47 (7 years ago) parenta6ac71a
1 file changed+1−1
tutorials/hoon/conditionals.md+1−1
tutorials/hoon/conditionals.md+1−1
@@ -57,7 +57,7 @@ The last boolean test we have is
5757```hoon
5858 =(0 (mod n 2))
5959```
60−This checks to see if `0` is equal to `(mod n 2)` and produces `%.y` if `n` is even and `%.n` if `n` is odd.
60+This checks to see if `0` is equal to `(mod n 2)` - in other words, checking if `n` is even. It produces `%.y` if `n` is even and `%.n` if `n` is odd.
6161
6262It is good practice in Hoon to put "lighter" lines at the top and "heavier" lines at the bottom, which is why we have put `=(0 (mod n 2))` last in the list of conditionals.
6363