Add #3 Haskell solution