Haskell - Exercise 3