Problem 13, haskell