Don't think there's anything wrong with your solution.
Here's another one I threw together just now:
: divisible-by? ( n1 n2 -- f f ) \ is n1 divisible by n2?
mod 0= dup ;
: fizz ( n -- f ) \ true if divisible
3 divisible-by? if ." Fizz" then ;
: buzz ( n -- f ) \ true if divisible
5 divisible-by? if ." Buzz" then ;
: zoom ( n -- f ) \ true if divisible
7 divisible-by? if ." Zoom" then ;
: run ( n -- )
cr i fizz
i buzz or
i zoom or
0= if i . then
- perhaps more meaningful names
- no need for return stack for keeping i
- a bit less stack thrashing, just 1 dup
- fewer items being tossed around on the stack
- fizz/buzz/zoom could be factored further, not sure it's worth it
No doubt someone else has a more clever solution.