3 ms·
The only formulation for FizzBuzz that I've seen 'in the wild' is "Write a program that prints XYZ (to standard out)"
by dagw 5y ago
The only formulation for FizzBuzz that I've seen 'in the wild' is "Write a program that prints XYZ (to standard out)"
- e12e 5y agoI don't think treating it as two subproblems: generate a sequence xyz, print the sequence to standard out - is terrible over-engineering - especially if it enables simpler tests? Ed: or in the case of fizz-buzz; a function to transform a number (returns "<number>", "fizz", "buzz" or "fizz-buzz"), a function that maps a sequence (eg 1..100) via fizbuzz(), and then a function that prints such a sequence.