Skip to content

Instantly share code, notes, and snippets.

@urcades
Created July 22, 2019 16:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save urcades/f85255732f7eec5a991a96384413c74d to your computer and use it in GitHub Desktop.
Save urcades/f85255732f7eec5a991a96384413c74d to your computer and use it in GitHub Desktop.
Hoon 101 Assignment 2
:: 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