|
|
|
|
|
by skwosh
3956 days ago
|
|
I think using Haskell's type syntax is misleading in this context (and doesn't really imply the required associativity (much less commutativity if you wanted to consider Abelian monoids)). The operation of a monoid maps from pairs of things to things. So in terms of types: <a,a> -> a
Or for some `twin` type constructor: twin a -> a
This is a bit more suggestive also in terms of F-algebras, where the operation has the following signature (f is a functor, or mappable container): f a -> a
|
|