quartata

Untitled

Oct 24th, 2015
233
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. 1As{3%!"Fizz"~5%!"Buzz">N=?~N<}\
  2.  
  3. 1 | Pushes 1 to the stack.
  4. A | Pushes 10 to the stack.
  5. s | Pops 10 off and pushes the square of it (100)
  6. {
  7. 3% | Pops off the top value of the stack (for-loop counter) and pushes modulo 3
  8. !"Fizz" | Pushes "Fizz" if result is 0 (falsy)
  9. ~ | Pushes the value of the register (for-loop counter)
  10. 5% | Modulo 5
  11. !"Buzz" | Pushes "Buzz" if falsy
  12. > | Moves the wheel pointer over by one (we are now in the string/regex wheel)
  13. N= | Compares top value to a newline
  14. ?~ | If truthy, push the value of the register
  15. N | Push a newline
  16. < | Moves the wheel pointer back by one (we are now in the math wheel)
  17. }\ | Loops between 1-100, pushing the for-loop counter to the stack and to the register each iteration
Advertisement
Add Comment
Please, Sign In to add comment