3 ms·
what the heck is the reverse state monad
by lacrosse_tannin 5y ago
what the heck is the reverse state monad
- chowells 5y agoIt passes state backwards, so that changes are visible to previous reads. If this sounds like it has problems with causality - it can. You can end up in an infinite loop when a calculation ends up depending on its own result. But sometimes it solves a problem very neatly. Being able to express it is one of the advantages of making evaluation order independent of declaration order.