Fizz Buzz Through Monoids

Some decade ago I read a good implementation of fizzbuzz. What set it apart was its excellent modularity. The original article is no longer on the web, but this is my reconstruction: In[1]: module Main where import Control.Monad (guard) import Data.Foldable (for_) import Data.Maybe (fromMaybe) fizzbuzz i = fromMaybe (show i) . mconcat $ [ "fizz" <$ guard (rem i 3 == 0) , "buzz" <$ guard (rem i 5…