Problem 14, haskell