3 ms·
> Monads, even when restricted to programming language usage, do not fundamentally have anything to do with continuations. This is a little too strong, I think
by consilient 3y ago
> Monads, even when restricted to programming language usage, do not fundamentally have anything to do with continuations.
This is a little too strong, I think. If your category is sufficiently nice (complete closed symmetric monoidal, I think) then every monad arises as a codensity monad `Codensity_F x = \int_{y} (x -> Fy) => Fy` (with `->` and `=>` as the respective homs), which is clearly continuationy in character.
There are so far as I know no programming languages that correspond to genuinely complete categories, but Haskell at least is close enough that this construction still works. The main obstacle there to "`Monad`s are just continuations" isn't mathematical, it's the lack of language support for talking about categories other than `Hask`.