et.Interface.MONAD</code></a> is a <i>monoid in the category of endofunctors</i>.</p><p>Monads are endofunctors: they're <a href="#functors">functors</a> that have a <code>pure</code> function that can be thought of as a constructor function, and a <code>flatten</code> function that flattens the nested type.</p><p>It's common practice to provide a <code>flat_map</code> function directly instead of a <code>flatten</code> function. The <code>flat_map</code> function can be derived from <code>flat_map f = comp