adding problem 8 solution for haskell
haskell solution for 9