3 ms·
I think that is a better FizzBuzz example. You are right that it isn't meant to showcase the whole language, but lacking a composable solution (mod N1 || mod N2
by kortex 5y ago
I think that is a better FizzBuzz example. You are right that it isn't meant to showcase the whole language, but lacking a composable solution (mod N1 || mod N2... for N prime factors) makes me immediately think the language does not lend itself well to that kind of composition.
And as others mentioned, Fizzbuzz is merely a "can you program anything test." But I do prefer the "general" fizzbuzzjazz, which accepts a list of numbers and a list of words [fizz, buzz, jazz,...] and emits the strings for appropriate prime factors.