Solve #80 in Haskell.