/**
 * Folds over the value or cause.
 *
 * @tsplus fluent ets/Exit fold
 */
export function fold_(self, failed, completed) {
  switch (self._tag) {
    case "Failure":
      return failed(self.cause);

    case "Success":
      return completed(self.value);
  }
}
/**
 * Folds over the value or cause.
 *
 * @tsplus static ets/Exit/Aspects fold
 */

export const fold = (failed, completed) => self => fold_(self, failed, completed);
//# sourceMappingURL=fold.mjs.map