Solve #60 in Haskell.