Last active
December 13, 2015 18:49
-
-
Save masaedw/4958039 to your computer and use it in GitHub Desktop.
a fizzbuzz implementation written in pudding
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
: succ 1 + ; | |
: drop2 drop drop ; | |
: mod=0 mod 0 == ; | |
: fb' dup 15 mod=0 if "fizzbuzz" . else dup 5 mod=0 if "buzz" . else dup 3 mod=0 if "fizz" . else dup . then then then ; | |
: fb ; | |
: fb dup2 >= if fb' succ fb else drop2 then ; | |
100 1 fb |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment