Solve #71 in Haskell.