Solve #79 in Haskell.