3 ms·
> import Control.Monad (guard) > "fizz" <$ guard (rem i 3 == 0) I prefer the more transparent if i `mod` 3 == 0 then Just "fizz" else Nothing
by tromp 5mo ago
> import Control.Monad (guard)
> "fizz" <$ guard (rem i 3 == 0)
I prefer the more transparent
if i `mod` 3 == 0 then Just "fizz" else Nothing