"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.mapErrorCause = void 0;
exports.mapErrorCause_ = mapErrorCause_;

var _definition = /*#__PURE__*/require("@effect/core/io/Exit/definition");

/**
 * Maps over the cause type.
 *
 * @tsplus fluent ets/Exit mapErrorCause
 */
function mapErrorCause_(self, f) {
  switch (self._tag) {
    case "Failure":
      return new _definition.Failure(f(self.cause));

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


const mapErrorCause = f => self => mapErrorCause_(self, f);

exports.mapErrorCause = mapErrorCause;
//# sourceMappingURL=mapErrorCause.js.map