import * as tsplus_module_1 from "@effect/core/stm/TMap/operations/foldSTM";
import { concreteTSet } from "@effect/core/stm/TSet/operations/_internal/InternalTSet";
/**
 * Atomically performs transactional-effect for each element in set.
 *
 * @tsplus fluent ets/TSet foreach
 */

export function foreach_(self, f) {
  void 0;
  return tsplus_module_1.foldSTM_(self.tmap, undefined, (_, kv) => f(kv.get(0)));
}
/**
 * Atomically performs transactional-effect for each element in set.
 *
 * @tsplus static ets/TSet/Aspects foreach
 */

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