Solve #76 in Haskell.