Anybody can write a oneliner FizzBuzz, but can you generalize it?
Here's a general FizzBuzz function in Haskell:
fizzBuzz xs = zipWith (\x y -> if null x then show y else x) (f xs)
where f = foldr (zipWith (++) . mask) (cycle [[]])
mask (k, v) = cycle (replicate (k-1) [] ++ [v])
Here's a sample run:
*FizzBuzz> fizzBuzz [(3, "Bucks"), (5, "Fizz"), (7, "Buzz")] [50 .. 150]
["Fizz","Bucks","52","53","Bucks","Fizz","Buzz","Bucks","58","59","BucksFizz","61",
"62","BucksBuzz","64","Fizz","Bucks","67","68","Bucks","FizzBuzz","71","Bucks","73",
"74","BucksFizz","76","Buzz","Bucks","79","Fizz","Bucks","82","83","BucksBuzz",
"Fizz","86","Bucks","88","89","BucksFizz","Buzz","92","Bucks","94","Fizz","Bucks",
"97","Buzz","Bucks","Fizz","101","Bucks","103","104","BucksFizzBuzz","106","107",
"Bucks","109","Fizz","Bucks","Buzz","113","Bucks","Fizz","116","Bucks","118","Buzz",
"BucksFizz","121","122","Bucks","124","Fizz","BucksBuzz","127","128","Bucks","Fizz",
"131","Bucks","Buzz","134","BucksFizz","136","137","Bucks","139","FizzBuzz","Bucks",
"142","143","Bucks","Fizz","146","BucksBuzz","148","149","BucksFizz"]