"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.flip = void 0;
// ets_tracing: off
const core_1 = require("./core");
const fail_1 = require("./fail");
const foldM_1 = require("./foldM");
/**
 * Returns an effect that swaps the error/success cases. This allows you to
 * use all methods on the error channel, possibly before flipping back.
 */
function flip(self, __trace) {
    return (0, foldM_1.foldM_)(self, core_1.succeed, fail_1.fail, __trace);
}
exports.flip = flip;
//# sourceMappingURL=flip.js.map