Solve #72 in Haskell.