Last post we looked at composing lists of functions using folds. This let use write functions of type `[a -> a] -> a -> a`

to compose lists of functions (take a list of functions `a -> a`

, and return a single function `a -> a`

).

Another way to do this relies on treating functions of type `a -> a`

, also known as endomorphisms, as a monoid.

## Prologue (or "Why bother?")

Me-from-a-year-ago would have tuned out when someone dropped a monoid-bomb or similar term, assuming it was too complicated. Since then I’ve found lots of maths / category theory terms co-opted by computer science that represent surprisingly straight-forward and useful concepts. No Babel fish required, just a little bit of patience. :)

Even more surprisingly, I’ve found looking at this stuff both interesting and fun!