solutions for haskell 99 problems