urbit/arvo/test.hoon
2014-09-08 19:38:41 -07:00

25 lines
275 B
Plaintext

?> ?=([@ @] .)
%. .
|= [x=@ y=@]
=- (add:all x y)
^= all
=> %164
~% %k.164 ~ ~
|%
++ add
~/ %add
|= [a=@ b=@]
^- @
?: =(0 a) b
$(a (dec a), b +(b))
::
++ dec
~/ %dec
|= a=@
?< =(0 a)
=+ b=0
|- ^- @
?: =(a +(b)) b
$(b +(b))
--