//arrow-fx-stm/arrow.fx.stm/TVar/Companion/new

new

common suspend fun <A> new(a: A): TVar<A>

Return a new TVar

More efficient than atomically { newVar(a) } because it skips creating a transaction.

Do you like Arrow?

Arrow Org
<