Added solution to problem 42 in haskell.