import * as tsplus_module_1 from "@tsplus/stdlib/collections/Chunk/map";
import * as tsplus_module_2 from "@effect/core/stm/TMap/operations/removeIf";
import * as tsplus_module_3 from "@effect/core/stm/STM/operations/map";
import { concreteTSet } from "@effect/core/stm/TSet/operations/_internal/InternalTSet";
/**
 * Removes bindings matching predicate and returns the removed entries.
 *
 * @tsplus fluent ets/TSet removeIf
 */

export function removeIf_(self, p) {
  void 0;
  return tsplus_module_3.map_(tsplus_module_2.removeIf_(self.tmap, kv => p(kv.get(0))), _ => tsplus_module_1.map_(_, kv => kv.get(0)));
}
/**
 * Removes bindings matching predicate and returns the removed entries.
 *
 * @tsplus static ets/TSet/Aspects removeIf
 */

export const removeIf = p => self => removeIf_(self, p);
//# sourceMappingURL=removeIf.mjs.map