sequence . mapM state monads is wrong. you should always thread them I suspect there is no way to enforce that without introducing stronger type. I know Haskell has it, but it's a matter of ergonomic and adoption