How do you create abstractions that fit in your brain? How do you define abstractions that truly amplify the essentials and eliminate the irrelevant? A Composite makes many objects look like one object, so that’s one way to hide details. As the previous episode revealed, a Composite can be turned into a precise abstraction by realizing that it’s just a monoid.
What’s a monoid, then? In this video, you’ll get all the details with easy-to-understand examples in C#. Not only will you learn just how a Composite is a monoid, but you’ll also come to the realization that the Null Object design pattern is a monoid as well; it’s simply a special case of the Composite pattern.
This episode gives you the tools to identify monoids in your own code base, and thereby also to predict where and how you’d need to refactor your code in order to make it composable. That, again, will give you a valuable recipe for composing your code so that it fits in your brain.