Monoids and Monads and Bears, Oh My! And Functors too.
Get ready for a gentle stroll down Category Theory lane. Don't freak out. We're not going to get into any heavy mathematics or anything. We're just going to skim the surface of category theory. We'll dip our toe into the waters, just enough to explain one of the most powerful concepts in programming: The concept of Composition.
We'll begin by describing what composition is, and the history of composition in software -- starting with Turing and ending up with objects, and lambdas, and streams.
Then we'll dig just below the crust of category theory in order to expose the simplest of the concepts: Categories and Monoids. We'll show how these two concepts relate to Map and Reduce.
Then we'll dig a tiny bit further into the concepts of Functors, Categories of Categories, and -- of course -- Monads!
And that will be enough. Oh yes, that will be enough.
These concepts may seem a bit academic; but I think you'll find them valuable as a way to think about how the elements of software systems are composed.