Add problem 41 in Haskell