/** * Updates some values of the variable but leaves others alone. * * @tsplus static effect/core/stm/TRef.Aspects updateSomeAndGet * @tsplus pipeable effect/core/stm/TRef updateSomeAndGet */ export function updateSomeAndGet(pf: (a: A) => Maybe) { return (self: TRef): STM => self.updateAndGet((a) => pf(a).getOrElse(a)) }