remembered to update
This commit is contained in:
parent
2b9b002e1c
commit
aac01b3ce3
12 changed files with 310 additions and 0 deletions
13
101/week2/week2.hoon
Normal file
13
101/week2/week2.hoon
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
:: Hoon School - Week 2
|
||||
:: ~bannum-magtus || s@p7.co.nz
|
||||
::
|
||||
|= 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" ::
|
||||
Loading…
Add table
Add a link
Reference in a new issue