solutions to haskell99 problems