import { Failure } from "@effect/core/io/Exit/definition";
/**
 * Maps over the cause type.
 *
 * @tsplus fluent ets/Exit mapErrorCause
 */

export function mapErrorCause_(self, f) {
  switch (self._tag) {
    case "Failure":
      return new Failure(f(self.cause));

    case "Success":
      return self;
  }
}
/**
 * Maps over the cause type.
 *
 * @tsplus static ets/Exit/Aspects mapErrorCause
 */

export const mapErrorCause = f => self => mapErrorCause_(self, f);
//# sourceMappingURL=mapErrorCause.mjs.map