added Haskell solution for problem 6