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