/** * Retry the transaction if the supplied partial function does not match, * otherwise succeed with the returned value. * * @tsplus static effect/core/stm/STM.Aspects continueOrRetry * @tsplus pipeable effect/core/stm/STM continueOrRetry */ export function continueOrRetry(pf: (a: A) => Maybe) { return (self: STM): STM => self.continueOrRetrySTM( (x) => pf(x).map(STM.succeed) ) }