runState package:incipit-core

Run a State effect with local state.
Run a State effect by transforming it into operations over an IORef. Note: This is not safe in a concurrent setting, as modify isn't atomic. If you need operations over the state to be atomic, use runAtomicStateIORef or runAtomicStateTVar instead.
Run a State effect by transforming it into operations over an STRef.