/** * Attempts to convert defects into a failure, throwing away all information * about the cause of the failure. * * @tsplus static effect/core/io/Effect.Aspects absorbWith * @tsplus pipeable effect/core/io/Effect absorbWith */ export function absorbWith(f: (e: E) => unknown) { return (self: Effect): Effect => self .sandbox .foldEffect((cause) => Effect.fail(cause.squashWith(f)), Effect.succeed) }