import * as tsplus_module_1 from "@tsplus/stdlib/data/Maybe/definition";
import * as tsplus_module_2 from "@effect/core/stm/STM/operations/continueOrRetry";
/**
 * Filters the value produced by this effect, retrying the transaction until
 * the predicate returns true for the value.
 *
 * @tsplus fluent ets/STM retryUntil
 */

export function retryUntil_(self, f) {
  return tsplus_module_2.continueOrRetry_(self, a => f(a) ? tsplus_module_1.some(a) : tsplus_module_1.none);
}
/**
 * Filters the value produced by this effect, retrying the transaction until
 * the predicate returns true for the value.
 *
 * @tsplus static ets/STM/Aspects retryUntil
 */

export const retryUntil = f => self => retryUntil_(self, f);
//# sourceMappingURL=retryUntil.mjs.map