arrow-fx-coroutines / arrow.fx.coroutines / Atomic / tryModify

tryModify

abstract suspend fun <B> tryModify(f: (A) -> Pair<A, B>): B?

Like tryUpdate but allows the update function to return an output value of type B.

Returns null if the update fails and B otherwise.

Do you like Arrow?

Arrow Org
<