Hacker News new | ask | show | jobs
by jacquesm 4069 days ago
I'm sure that Haskell can do better than that in the readability department.
1 comments

It can, I was just trying to be clever :P

For one, I don't need to drag monads into function composition:

    fizzbuzz i triggers = map (\x -> fromMaybe (show x) $ 
                                               mconcat $ triggers x) 
                              [i..]

    fizzbuzz 1 $ \i -> [["Fizz" | i `rem` 3 == 0]
                       ,["Buzz" | i `rem` 5 == 0]
                       ]