Package: effect
Module: SynchronizedRef
Computes a return value and an optional new ref value atomically.
Option.some updates the ref; Option.none leaves it unchanged.
When to use
Use to compute a return value while optionally updating a SynchronizedRef
under its semaphore.
See
modify for always storing a new valueupdateSome for optional updates without a separate return valueSignature
declare const modifySome: { <B, A>(pf: (a: A) => readonly [B, Option.Option<A>]): (self: SynchronizedRef<A>) => Effect.Effect<B>; <A, B>(self: SynchronizedRef<A>, pf: (a: A) => readonly [B, Option.Option<A>]): Effect.Effect<B>; }
Since v2.0.0