arrow-fx-coroutines / arrow.fx.coroutines / Atomic / tryUpdate
abstract suspend fun tryUpdate(f: (A) -> A): Boolean
abstract suspend fun tryUpdate(f: (A) -> A):
Attempts to modify the current value once,
in contrast to update which calls f until it succeeds.
false if concurrent modification completes between the time the variable is read and the time it is set.
Do you like Arrow?