Advertisement
Guest User

Untitled

a guest
May 28th, 2017
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. :: Accepts any atom from dojo and uses it
  2. :: as the end limit for fizzbuzz
  3. ::
  4. :::: /hoon/fizz/examples/app
  5. ::
  6. /? 310
  7. !:
  8. |_ {bowl state/$~}
  9. ++ poke-atom
  10. |= end/@
  11. ^- {(list) _+>.$}
  12. =/ count 1
  13. ~&
  14. |- ^- (list tape)
  15. ?: =(end count) ~
  16. :-
  17. ?: =(0 (mod count 15))
  18. "fizzbuzz"
  19. ?: =(0 (mod count 5))
  20. "fizz"
  21. ?: =(0 (mod count 3))
  22. "buzz"
  23. (pave !>(count))
  24. $(count (add 1 count))
  25. [~ +>.$]
  26. --
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement