I'm just wondering whether there's a concise term for something that's both a monad and a comonad. I've done some searching, and I know these structures exist, but I haven't found a name for them.
Is there a term for a monad that is also a comonad?
501 views Asked by qbeightol At
2
There are 2 answers
0
On
Such a creature, subject to certain conditions, is sometimes called a "Hopf monad" or a "Bimonad" (http://ncatlab.org/nlab/show/Hopf+monad).
However, this also requires fulfilling a number of axioms regarding distributive properties, and I haven't seen it come up in a programming context in any particular way.
As far as I know, there is no term to define it because a monad-comonad would enforce nothing: you can always do a
return
to get in or anextract
to get out.As types are there to enforce some constraints, a too permissive constraint wouldn't be of any use. As no one would use it (except for the identity), no one probably bothered to name it.