urbit/arvo/test.hoon
2014-09-06 19:54:25 -07:00

25 lines
274 B
Plaintext

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