/** * The moral equivalent of `if (!p) exp` when `p` has side-effects. * * @tsplus static effect/core/stm/STM.Aspects unlessSTM * @tsplus pipeable effect/core/stm/STM unlessSTM */ export function unlessSTM(predicate: LazyArg>) { return (self: STM): STM> => STM.suspend(predicate().flatMap((b) => (b ? STM.none : self.asSome))) }