import * as tsplus_module_1 from "@effect/core/io/FiberRef/operations/locally";
import * as tsplus_module_2 from "@effect/core/io/FiberRef/operations/getWith";
/**
 * Returns an `Effect` that runs with `f` applied to the current fiber.
 *
 * Guarantees that fiber data is properly restored via `acquireRelease`.
 *
 * @tsplus fluent ets/FiberRef locallyWith
 */

export function locallyWith_(self, f, __tsplusTrace) {
  return effect => tsplus_module_2.getWith_(self, a => tsplus_module_1.locally_(self, f(a), __tsplusTrace)(effect), __tsplusTrace);
}
/**
 * Returns an `Effect` that runs with `f` applied to the current fiber.
 *
 * Guarantees that fiber data is properly restored via `acquireRelease`.
 *
 * @tsplus static ets/FiberRef/Aspects locallyWith
 */

export const locallyWith = (f, __tsplusTrace) => self => locallyWith_(self, f, __tsplusTrace);
//# sourceMappingURL=locallyWith.mjs.map