added Haskell solution for problem 4