答案 0 :(得分:8)
不,一个单子论不是强幂等的:尽管有一个自然变换的要求
mu_x : T(T(x)) -> T(x)
通常情况下,不是以这种方式选择的两个对象相等,即
T(T(x)) = T(x)
通常不成立,甚至直到同构。
即使在Haskell Monad
的受限地区,也很容易看到这一点:Maybe (Maybe ())
和Maybe ()
显然是不相等的类型,具有不同数量的语义对象。忽略底部:
Nothing, Just () -- Maybe ()
Nothing, Just Nothing, Just (Just ()) -- Maybe (Maybe ())
或有底:
_|_, Nothing, Just _|_, Just () -- Maybe ()
_|_, Nothing, Just _|_, Just Nothing, Just (Just _|_), Just (Just ()) -- Maybe (Maybe ())