type class abstracting over type classes
adapt `Monoid` example to use new `TypeClass` machinery