haskell problem 10