"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.tap_ = exports.tap = void 0;
// ets_tracing: off
const core_1 = require("./core");
const map_1 = require("./map");
/**
 * Returns an effect that effectfully "peeks" at the success of this effect.
 *
 * @ets_data_first tap_
 */
function tap(f, __trace) {
    return (fa) => tap_(fa, f, __trace);
}
exports.tap = tap;
/**
 * Returns an effect that effectfully "peeks" at the success of this effect.
 */
function tap_(_, f, __trace) {
    return (0, core_1.chain_)(_, (a) => (0, map_1.map_)(f(a), () => a), __trace);
}
exports.tap_ = tap_;
//# sourceMappingURL=tap.js.map