|| :: fizzbuzz :n: 1 :max: 100 |:: fizzbuzz :n: $n? :max: $m?| :: as long as $n is not greater than $m :: then :: $n is a multiple of 3 :: then :: it's a fizz number :: $n is a multiple of 5 :: then :: it's a buzz number :: end :: else :: $n is a multiple of 5 :: then :: it's a buzz number :: $n is a multiple of 3 :: then :: it's a buzz number :: end :: end :: show the number's fizzbuzziness :: next n :: fizzbuzz :: end |:: as long as $n is not greater than $m :@math: greater| :: false |:: as long as $n is not greater than $m :@math: $not-greater| |:: as long as $n is not greater than $m?| :@math: compare $n $m |:: $n is a multiple of $m :@math: 0| |:: $n is a multiple of $m :@math: $nope| :: false |:: $n is a multiple of $m?| :@math: modulo $n $m |:: it's a fizz number| :fizz: |:: it's a buzz number| :buzz: |:: show the number's fizzbuzziness| :: push new line :: push buzz :: push fizz :: show the fizzbuzziness |:: push new line| :message: "\n" |:: push buzz :buzz:| :message: "buzz" |:: push buzz| |:: push fizz :fizz:| :message: "fizz" |:: push fizz| |:: show the fizzbuzziness :n: $n? :message: "\n"| :: print (formatted) :message: "{%d}\n" :arguments: $n :arguments: |:: show the fizzbuzziness| :: print (formatted) |:: next n :@math: $n| :n: $n |:: next n? :n: $n| :@math: add $n 1 |:: print (formatted)? :message: "{%d}" :arguments:| |:: print (formatted)? :message: "{%d}" :arguments: $n| :message: "{}" :: collect digits of $n |:: collect digits of $n :div: 0 :mod: $mod| :: add digit to message $mod |:: collect digits of $n :div: $div :mod: $mod| :: add digit to message $mod :: collect digits of $div |:: collect digits of $n?| :: divide by 10 :@math: divide $n 10 :: mod by 10 :@math: modulo $n 10 |:: divide by 10 :@math: $div| :div: $div |:: mod by 10 :@math: $mod| :mod: $mod |:: add digit to message $n :@math: $char| :message: $char |:: add digit to message $n?| :@math: add 48 $n |:: print (formatted)? :message: "{}" :arguments: | |:: print (formatted)? :message: "{}"? :arguments: $char| :@stdio: write $char |:: print (formatted)? :message: "\n"| :@stdio: write 10 |:: print (formatted)? :message: $char| :@stdio: write $char |:: print (formatted)|