States and exceptions are dual effects
Résumé
Global states and exceptions form two basic computational effects. In this paper it is proved that they can be seen as dual to each other: the lookup and update operations for global states are dual to the raise and handle operations for exceptions, respectively. In order to get this result we use a monad for exceptions and a comonad for global states.
Origine | Fichiers produits par l'(les) auteur(s) |
---|