Interesting observation that the state *co*monad (sometimes known as the product comonad) and exception monad are dual:

T A = A × X (state comonad)

T A = A + X (exception monad)

A duality between exceptions and states

The duality between categorical products and sums can be extended as a duality between the semantics of the lookup and update operations for states on one side and the semantics of the constructor [throw] and recovery operations [catch] for exceptions on the other side.

## Recent comments

1 day 21 hours ago

3 days 15 hours ago

2 weeks 16 hours ago

2 weeks 6 days ago

3 weeks 6 days ago

5 weeks 4 days ago

6 weeks 20 hours ago

7 weeks 1 day ago

7 weeks 5 days ago

7 weeks 5 days ago