"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.cause = void 0;
const cause_1 = require("../Cause/cause");
const core_1 = require("./core");
/**
 * Returns an effect that succeeds with the cause of failure of this effect,
 * or `Cause.empty` if the effect did not succeed.
 */
function cause(effect, __trace) {
    return (0, core_1.foldCauseM_)(effect, core_1.succeed, () => (0, core_1.succeed)(cause_1.empty), __trace);
}
exports.cause = cause;
//# sourceMappingURL=cause.js.map