Package: effect
Module: SynchronizedRef
Updates the value of the SynchronizedRef with a function and returns the
new value.
When to use
Use to apply a pure SynchronizedRef state transition and return the new
stored value.
See
update for updating without returning the new valuegetAndUpdate for updating while returning the previous valueSignature
declare const updateAndGet: { <A>(f: (a: A) => A): (self: SynchronizedRef<A>) => Effect.Effect<A>; <A>(self: SynchronizedRef<A>, f: (a: A) => A): Effect.Effect<A>; }
Since v2.0.0