homework 2 and solutions for the haskell programming language 2314885