Solve #43 in Haskell.