forked from urbit/archaeology
-
Notifications
You must be signed in to change notification settings - Fork 0
Hoon rub
Adam Bliss edited this page Oct 25, 2013
·
1 revision
++ rub :: length-decode
~/ %rub
|= [a=@ b=@]
^- [p=@ q=@]
=+ c==+(c=0 |-(?.(=(0 (cut 0 [(add a c) 1] b)) c $(c +(c)))))
?: =(0 c)
[1 0]
=+ d=(add a +(c))
=+ e=(add (bex (dec c)) (cut 0 [d (dec c)] b))
[(add (add c c) e) (cut 0 [(add d (dec c)) e] b)]
Parts of this document are generated automatically. Edits within the comments section will be preserved.