import * as tsplus_module_1 from "@effect/core/stm/STM/operations/map";
import * as tsplus_module_2 from "@effect/core/stm/STM/operations/forEach";
/**
 * Applicative structure.
 *
 * @tsplus static ets/STM/Ops struct
 */

export function struct(r, __tsplusTrace) {
  return tsplus_module_1.map_(tsplus_module_2.forEach(() => Object.entries(r), ([_, e]) => tsplus_module_1.map_(e, a => [_, a])), values => {
    const res = {};

    for (const [k, v] of values) {
      res[k] = v;
    }

    return res;
  });
}
//# sourceMappingURL=struct.mjs.map