2 ms·
Types like (a -> a -> a) which are associative show up everywhere and are often named as Semigroups—there's a (somewhat) popular library which provides all kind
by tel 13y ago
Types like (a -> a -> a) which are associative show up everywhere and are often named as Semigroups—there's a (somewhat) popular library which provides all kinds of hooks into the abstract algebra in that space. When we also have that (a -> a -> a) has a zero then we call it a Monoid and that typeclass is built-in.
In short, there's a continual tension between wanting to reify the entire abstract algebraic hierarchy and the weight and arbitrariness of doing such a thing. To resolve this, the community tends to favor typeclasses which have enough law structure to determine uniquely what the semantics of that algebraic pattern ought to be.
For Monad that is absolutely the case. There is wonderful algebraic structure to monads and thus they are named.
For Magma... not so much. So you've got an operator, eh?