Haskell solutions to Problem 1 and 2