Monads as adjunctions

前端 未结 5 1193
闹比i
闹比i 2020-12-04 07:35

I\'ve been reading about monads in category theory. One definition of monads uses a pair of adjoint functors. A monad is defined by a round-trip using those functors. Appare

5条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-04 08:05

    Derek Elkins was showing me recently over dinner how the Cont Monad arises from composing the (_ -> k) contravariant functor with itself, since it happens to be self-adjoint. That's how you get (a -> k) -> k out of it. Its counit, however, leads to double negation elimination, which can't be written in Haskell.

    For some Agda code that illustrates and proves this, please see http://hpaste.org/68257.

提交回复
热议问题