/** * Fail with the returned value if the `PartialFunction` matches, otherwise * continue with our held value. * * @tsplus static effect/core/stm/STM.Aspects reject * @tsplus pipeable effect/core/stm/STM reject */ export function reject(pf: (a: A) => Maybe) { return (self: STM): STM => self.rejectSTM( (a) => pf(a).map(STM.fail) ) }