import Data.Monoid

instance Monoid b => Monoid (a -> b) where
  -- mempty :: (a -> b)
  mempty = const mempty

  -- mappend :: (a -> b) -> (a -> b) -> (a -> b)
  f `mappend` g = (\a -> f a `mappend` g a)


 mempty :: (a -> b)
 mappend :: (a -> b) -> (a -> b) -> (a -> b)
import Data.Monoid

instance Monoid b => Monoid (a -> b) where
  mempty = const mempty

  f `mappend` g = (\a -> f a `mappend` g a)

