Monad (source code)
= Monad
{wiki=Monad_(category_theory)}
A <monad> on a <category> consists of an <endofunctor> $T$ and <natural transformations> $\eta:1\Rightarrow T$, $\mu:T^2\Rightarrow T$ satisfying $\mu\,T\mu=\mu\,\mu T$ and $\mu\,T\eta=1_T=\mu\,\eta T$. These express associative flattening with a neutral insertion.
For the list <monad> on <sets>, $T(X)$ is the set of finite lists from $X$, $\eta$ makes a one-element list, and $\mu$ concatenates a list of lists. Both ways of flattening three nested levels agree. An <algebra for a monad> interprets these formal constructions in an object; list-monad algebras are <monoids>.
Back to article page