haskell problem 5