const fileName_1 = "(@effect/core) _src/io/Layer/operations/tap.ts";
import * as tsplus_module_1 from "@effect/core/io/Effect/operations/map";
import * as tsplus_module_2 from "@effect/core/io/Layer/operations/fromEffectEnvironment";
import * as tsplus_module_3 from "@effect/core/io/Layer/operations/flatMap";
/**
 * Performs the specified effect if this layer succeeds.
 *
 * @tsplus fluent ets/Layer tap
 */

export function tap_(self, f) {
  return tsplus_module_3.flatMap_(self, environment => tsplus_module_2.fromEffectEnvironment(() => tsplus_module_1.map_(f(environment), () => environment, fileName_1 + ":10:86"), fileName_1 + ":10:67"));
}
/**
 * Performs the specified effect if this layer succeeds.
 *
 * @tsplus static ets/Layer/Aspects tap
 */

export const tap = f => self => tap_(self, f);
//# sourceMappingURL=tap.mjs.map