Simple test pill for memorable.

This commit is contained in:
C. Guy Yarvin 2014-09-06 14:09:15 -07:00
parent 99072c03b1
commit 2840da1066

31
main/bin/easy1.hoon Normal file
View File

@ -0,0 +1,31 @@
!:
:: /=main=/bin/solid/hoon
::
=> .(- `[who=@p how=path]`-)
|= [est=time eny=@uw]
|= arg=~
=+ ^= cor
=< |= [x=@ y=@]
(add x y)
=> %164
~% %k164 ~ ~
|%
++ add
~/ %add
|= [a=@ b=@]
^- @
?: =(0 a) b
$(a (dec a), b +(b))
::
++ dec
~/ %dec
|= a=@
~| %decrement-underflow
?< =(0 a)
=+ b=0
|- ^- @
?: =(a +(b)) b
$(b +(b))
--
:_ ~ :_ ~
[%xx %sage [%easy1 %pill ~] cor]