[Haskell-cafe] found monad in a comic

Dan Piponi dpiponi at gmail.com
Wed Jun 13 19:18:00 EDT 2007

Marc asked:

> <http://xkcd.com/c248.html>
> ( join /= coreturn )
> IMHO this could be a beautiful and easy way to explain monads.
> comments?

I'll eat my hat if there isn't a formal way of looking at this. I'm
not qualified to put it together coherently but it goes something like
this: modal logic has Kripke semantics based on the notion of many
worlds. For the right modal logic, the many worlds idea captures the
notion of counterfactual worlds. We can also extend the Curry-Howard
isomorphism to include modal logic. Some of the laws of modal logic
(or their duals) correspond to monad (or comonad) laws (see laws 4 and
t here: http://en.wikipedia.org/wiki/Kripke_semantics). These laws
translate into rules about what worlds 'accessible' from what other
worlds. So that cartoon may have a formal interpretation in terms of

More information about the Haskell-Cafe mailing list