Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- :: (*unsolved*)
- :: gen/problem--add.hoon
- :: Produce the sum of two unsigned atoms a and b.
- |= {a/@ b/@}
- |- ^- @
- ?~ a b
- %= $
- a =+ c=0 |- ?: =(a +(c)) c $(c +(c))
- b +(b)
- ==
- ::$(a (dec a), b +(b))
- ::::
- :: one-liner-adder
- != |= {a/@ b/@} |- ^- @ ?~ a b %= $ a =+ c=0 |- ?: =(a +(c)) c $(c +(c)) b +(b) ==
- ::
- [ 8
- [1 0 0]
- [ 1
- 8
- [ 1
- 6
- [5 [1 0] 0 28]
- [0 29]
- 9
- 2
- [0 2]
- [0 6]
- [ [ 8
- [1 0]
- 8
- [ 1
- 6
- [5 [0 124] 4 0 6]
- [0 6]
- 9
- 2
- [0 2]
- [4 0 6]
- 0
- 7
- ]
- 9
- 2
- 0
- 1
- ]
- 4
- 0
- 29
- ]
- 0
- 15
- ]
- 9
- 2
- 0
- 1
- ]
- 0
- 1
- ]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement