runState package:effectful-core

Run the State effect with the given initial state and return the final value along with the final state.
Run the State effect with the given initial state and return the final value along with the final state (via Effectful.State.Static.Local).
Run the State effect with the given initial state and return the final value along with the final state (via Effectful.State.Static.Shared).
Run the State effect with the given initial state MVar and return the final value along with the final state.