15 lines
575 B
Plaintext
15 lines
575 B
Plaintext
:: Hoon School - Week 2
|
|
:: ~bannum-magtus || s@p7.co.nz
|
|
::
|
|
|= a=* ::
|
|
^- tape :: explicitly return a tape
|
|
%- weld :: weld some strings to reduce repitition
|
|
:- "input is " ::
|
|
?: .?(a) :: first branch, test whether a is a cell
|
|
"a cell" ::
|
|
%- weld :- :: if not, take the atom branch
|
|
?: =((mod (@ a) 2) 0) :: this cast is safe as we know a is an atom
|
|
"an even" ::
|
|
"an odd" ::
|
|
" atom" ::
|