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