updateAndGet

abstract suspend fun updateAndGet(f: (A) -> A): A(source)

Modifies the current value using the supplied update function and returns the new value.

See also

, f may be invoked multiple times.