简体   繁体   English

是否有一个monad的术语也是comonad?

[英]Is there a term for a monad that is also a comonad?

I'm just wondering whether there's a concise term for something that's both a monad and a comonad. 我只是想知道是否有一个简洁的术语,既有monad又有comonad。 I've done some searching, and I know these structures exist , but I haven't found a name for them. 我做了一些搜索,我知道这些结构存在 ,但我还没有找到它们的名字。

Such a creature, subject to certain conditions, is sometimes called a "Hopf monad" or a "Bimonad" ( http://ncatlab.org/nlab/show/Hopf+monad ). 在某些条件下,这种生物有时被称为“Hopf monad”或“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 an extract to get out. 据我所知,没有术语来定义它,因为monad-comonad不执行任何操作:你总是可以return进入或extract出来。

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. 由于没有人会使用它(除了身份),没有人可能会为此命名。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM