/** * Recovers from some or all of the error cases with provided cause. * * @tsplus static effect/core/io/Effect.Aspects catchSomeCause * @tsplus pipeable effect/core/io/Effect catchSomeCause */ export function catchSomeCause(f: (_: Cause) => Maybe>) { return (self: Effect): Effect => self.foldCauseEffect( (c): Effect => f(c).fold( () => Effect.failCause(c), (a) => a ), Effect.succeed ) }