Comment

Comment by gloria_mundi

Remember that transformers are "inside-out", i.e. `StateT (ExceptT e m) a` is isomorphic to `m (Except e (State a))`. If we want to keep state if an exception occurs, you need a `m (State (Except e a))` which is `ExceptT e (StateT m) a`.

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton