const fileName_1 = "(@effect/core) _src/io/Layer/operations/fromFunction.ts";
import * as tsplus_module_1 from "@tsplus/stdlib/service/Env";
import * as tsplus_module_2 from "@effect/core/io/Effect/operations/serviceWith";
import * as tsplus_module_3 from "@effect/core/io/Layer/operations/fromEffectEnvironment";
/**
 * Constructs a layer from the environment using the specified function.
 *
 * @tsplus static ets/Layer/Ops fromFunction
 */

export function fromFunction(tagA, tagB, f) {
  return tsplus_module_3.fromEffectEnvironment(() => tsplus_module_2.serviceWith(tagA, a => tsplus_module_1.Env(tagB, f(a)), fileName_1 + ":7:56"), fileName_1 + ":7:37");
}
//# sourceMappingURL=fromFunction.mjs.map