: fizzbuzz ( Int -- String )
    dup 15 i.% drop 0 i.= [
        drop "FizzBuzz"
    ] [
        dup 3 i.% drop 0 i.= [
            drop "Fizz"
        ] [
            dup 5 i.% drop 0 i.= [
                drop "Buzz"
            ] [
                int->string
            ] if
        ] if
    ] if
;

: test-fizzbuzz ( -- )
    15 fizzbuzz
    "FizzBuzz" string.equal? test.assert
;
