chapter 1 exercises for Programming in Haskell book