Implemented exercise for Monoid[A=>A].