import * as tsplus_module_1 from "@effect/core/stm/TMap/operations/foldSTM";
import { concreteTSet } from "@effect/core/stm/TSet/operations/_internal/InternalTSet";
/**
 * Atomically folds using a transactional function.
 *
 * @tsplus fluent ets/TSet foldSTM
 */

export function foldSTM_(self, zero, op) {
  void 0;
  return tsplus_module_1.foldSTM_(self.tmap, zero, (acc, kv) => op(acc, kv.get(0)));
}
/**
 * Atomically folds using a transactional function.
 *
 * @tsplus static ets/TSet/Aspects foldSTM
 */

export const foldSTM = (zero, op) => self => foldSTM_(self, zero, op);
//# sourceMappingURL=foldSTM.mjs.map