arrow-fx / arrow.fx / Ref / setAndGet
abstract fun setAndGet(a: A): Kind<F, A>
Replaces the current value with a, returning the new value.
Do you like Arrow?