/** * Filters the value produced by this effect, retrying the transaction until * the predicate returns true for the value. * * @tsplus static effect/core/stm/STM.Aspects retryUntil * @tsplus pipeable effect/core/stm/STM retryUntil */ export function retryUntil(f: Predicate) { return (self: STM): STM => self.continueOrRetry( (a) => (f(a) ? Maybe.some(a) : Maybe.none) ) }