Created
July 22, 2019 16:37
-
-
Save urcades/f85255732f7eec5a991a96384413c74d to your computer and use it in GitHub Desktop.
Hoon 101 Assignment 2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:: Assignment Reflection 20190722 | |
:: | |
:: I was overthinking this assignment to a huge degree before | |
:: I read the type-checking docs in section 2.2 and sanity-checked | |
:: myself — I think I got too stuck with trying to replicate the | |
:: code demonstrated in the "conditionals" walkthrough | |
:: and added too many layers of t/f checking before | |
:: landing on the below solution, remembering that the assignment | |
:: was to produce a naked generator | |
|= arg=* | |
?^ arg | |
"arg is a cell" | |
?: =(0 (mod arg 2)) | |
"arg is an even @" | |
"arg is an odd @" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment