Should be implemented in terms of some kind of mutable variables. There's certainly some room in here for design discussion, e.g.:
- Is there any usage of atomic operations?
- Should we allow for using optimized mutable variables like a
URef?
Some prior art: https://www.stackage.org/package/monad-unlift-ref