Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- :: nacho.hoon
- :: Nacci in Hoon
- :: The first 1,000 Tribaonacci numbers:
- :: +nacci 1.000, ~[0 0 1]
- !:
- :- %say
- |= [* [end=@ud ~] [fibs=(list @ud) limit=@f ~]]
- :- %noun
- =/ count (lent fibs)
- =. fibs (flop fibs)
- |^
- ?: =(0 (lent fibs))
- $(fibs ~[1 0])
- ?: should-exit
- (flop fibs)
- $(fibs (weld ~[n] fibs))
- ++ n (reel (scag count fibs) add)
- ++ should-exit
- ?: limit
- (gte (lent fibs) end)
- (gth n end)
- --
Add Comment
Please, Sign In to add comment