import * as tsplus_module_1 from "@effect/core/stm/STM/operations/succeedNone";
import * as tsplus_module_2 from "@effect/core/stm/STM/operations/asSome";
import * as tsplus_module_3 from "@effect/core/stm/STM/operations/suspend";
/**
 * The moral equivalent of `if (!p) exp`
 *
 * @tsplus fluent ets/STM unless
 */

export function unless_(self, predicate) {
  return tsplus_module_3.suspend(() => predicate() ? tsplus_module_1.succeedNone : tsplus_module_2.asSome(self));
}
/**
 * The moral equivalent of `if (!p) exp`
 *
 * @tsplus static ets/STM/Aspects unless
 */

export const unless = predicate => self => unless_(self, predicate);
//# sourceMappingURL=unless.mjs.map