urbit/arvo/test.hoon

25 lines
274 B
Plaintext
Raw Normal View History

2014-09-07 06:54:25 +04:00
?> ?=([@ @] .)
%. .
|= [x=@ y=@]
=- (add:all x y)
^= all
=> %164
~% %k164 ~ ~
2014-01-30 04:16:10 +04:00
|%
2014-09-07 06:54:25 +04:00
++ add
2014-01-30 04:16:10 +04:00
~/ %add
|= [a=@ b=@]
^- @
2014-09-07 06:54:25 +04:00
?: =(0 a) b
2014-01-30 04:16:10 +04:00
$(a (dec a), b +(b))
::
2014-09-07 06:54:25 +04:00
++ dec
2014-01-30 04:16:10 +04:00
~/ %dec
|= a=@
?< =(0 a)
=+ b=0
|- ^- @
2014-09-07 06:54:25 +04:00
?: =(a +(b)) b
2014-01-30 04:16:10 +04:00
$(b +(b))
--