# Exercise: FizzBuzz
#
# The classic programming exercise!
#
# Rules:
#   - If divisible by 3 AND 5, return "FizzBuzz"
#   - Else if divisible by 3, return "Fizz"
#   - Else if divisible by 5, return "Buzz"
#   - Else return the number as a string
#
# This exercise uses the modulo operator `i.%`. Its stack effect is
# ( a b -- remainder success ) — it pushes the remainder of a / b
# along with a success Bool. Since our divisors are never zero here,
# drop the Bool.
#
# Example:
#   15 3 i.% drop   # ( 0 ) because 15 is divisible by 3
#   15 4 i.% drop   # ( 3 ) because 15 / 4 has remainder 3
#
# Your task: Implement fizzbuzz for the number 15.
# 15 is divisible by both 3 and 5, so return "FizzBuzz".
# When done, delete the marker line below.

# I AM NOT DONE

: fizzbuzz ( Int -- String )
    # Your code here.
    # Hint: check divisibility by 15 first (both 3 and 5).
    drop "wrong"
;

: test-fizzbuzz ( -- )
    15 fizzbuzz
    # Do not edit below this line
    "FizzBuzz" string.equal? test.assert
;
