Skip to content

Instantly share code, notes, and snippets.

@brendes
Created November 26, 2019 15:02
Show Gist options
  • Select an option

  • Save brendes/f202e2b35315ddbcd1b61f553fda1a8c to your computer and use it in GitHub Desktop.

Select an option

Save brendes/f202e2b35315ddbcd1b61f553fda1a8c to your computer and use it in GitHub Desktop.
:: HOON SCHOOL 101
:: ASSIGNMENT 02
:: Build a naked generator that takes a noun and checks if that noun is
:: a cell or an atom. If that input noun is an atom, check if it’s even or
:: odd. The output should be of the tape type. A tape is a string.
|= a=*
?^ a
"not an atom"
?: =(0 (mod a 2))
"it's even"
"it's odd"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment