Solve #64 in Haskell.