A monoid is a set $M$ equipped with an associative binary operation $\cdot : M \times M \rightarrow M$ and an identity element $e \in M$ such that for all $x \in M$, we have $x \cdot e = e \cdot x = x$.
Now, let's consider a function type $a \rightarrow b$, where
Show more…