Monoids: Theme and Variations (Functional Pearl) Brent A. Yorgey University of Pennsylvania byorgey@cis.upenn.edu Abstract The monoid is a humble algebraic structure, at first glance even downright boring. However, there’s much more to monoids than meets the eye. Using examples taken from the diagrams vector graphics framework as a case study, I demonstrate the power and beauty of monoids for libr