2019-07-15 18:41:36 -04:00
|
|
|
:: Hoon School - Week 2
|
|
|
|
:: ~bannum-magtus || s@p7.co.nz
|
|
|
|
::
|
2019-07-15 19:52:03 -04:00
|
|
|
|= a=* :: take in any noun
|
|
|
|
^- 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 - " atom") :: attach a block to the head of the subject
|
|
|
|
?: =((mod a 2) 0) :: mod is safe because we know a isnt a cell
|
|
|
|
"an even" ::
|
|
|
|
"an odd" ::
|