problem4 haskell