Solve #78 in Haskell.