import * as tsplus_module_1 from "@effect/core/stm/STM/operations/retry";
import * as tsplus_module_2 from "@tsplus/stdlib/data/Maybe/getOrElse";
import * as tsplus_module_3 from "@effect/core/stm/STM/operations/flatMap";
/**
 * Simultaneously filters and flatMaps the value produced by this effect.
 * Continues on the effect returned from the specified partial function.
 *
 * @tsplus fluent ets/STM continueOrRetrySTM
 */

export function continueOrRetrySTM_(self, pf) {
  return tsplus_module_3.flatMap_(self, a => tsplus_module_2.getOrElse_(pf(a), () => tsplus_module_1.retry));
}
/**
 * Simultaneously filters and flatMaps the value produced by this effect.
 * Continues on the effect returned from the specified partial function.
 *
 * @tsplus static ets/STM/Aspects continueOrRetrySTM
 */

export const continueOrRetrySTM = pf => self => continueOrRetrySTM_(self, pf);
//# sourceMappingURL=continueOrRetrySTM.mjs.map