import * as tsplus_module_1 from "@tsplus/stdlib/collections/HashSet/has";
import * as tsplus_module_2 from "@effect/core/stm/TSet/operations/removeIfDiscard";
import * as tsplus_module_3 from "@effect/core/stm/TSet/operations/toHashSet";
import * as tsplus_module_4 from "@effect/core/stm/STM/operations/flatMap";
/**
 * Removes elements from the set.
 *
 * @tsplus fluent ets/TSet diff
 */

export function diff_(self, other) {
  return tsplus_module_4.flatMap_(tsplus_module_3.toHashSet_(other), vals => tsplus_module_2.removeIfDiscard_(self, _ => tsplus_module_1.has_(vals, _)));
}
/**
 * Removes elements from the set.
 *
 * @tsplus static ets/TSet/Aspects diff
 */

export const diff = other => self => diff_(self, other);
//# sourceMappingURL=diff.mjs.map