G b) in haskell