/** * Continue with the returned computation if the `PartialFunction` matches, * translating the successful match into a failure, otherwise continue with * our held value. * * @tsplus static effect/core/io/Effect.Aspects rejectEffect * @tsplus pipeable effect/core/io/Effect rejectEffect */ export function rejectEffect(pf: (a: A) => Maybe>) { return (self: Effect): Effect => self.flatMap((a) => pf(a).fold( () => Effect.succeed(a), (effect) => effect.flatMap(Effect.fail) ) ) }