worked out examples from Graham Hutton's book (haskell)..