import "../../../Operator/index.js"; import type { Equal } from "../../../Equal/index.js"; import type { Predicate, Refinement } from "../../../Function/index.js"; import * as St from "../../../Structural/index.js"; import * as HM from "../HashMap/core.js"; import * as Tp from "../Tuple/index.js"; export declare class HashSet implements Iterable, St.HasHash, St.HasEquals { readonly keyMap: HM.HashMap; constructor(keyMap: HM.HashMap); [Symbol.iterator](): Iterator; get [St.hashSym](): number; [St.equalsSym](that: unknown): boolean; } export declare function make(): HashSet; /** * Creates a new set from an Iterable */ export declare function from(xs: Iterable): HashSet; export declare function add_(set: HashSet, v: V): HashSet; export declare function add(v: V): (set: HashSet) => HashSet; export declare function remove_(set: HashSet, v: V): HashSet; export declare function remove(v: V): (set: HashSet) => HashSet; export declare function values(set: HashSet): IterableIterator; export declare function has_(set: HashSet, v: V): boolean; /** * Apply f to each element */ export declare function forEach_(map: HashSet, f: (v: V) => void): void; /** * Mutate `set` within the context of `f`. */ export declare function mutate_(set: HashSet, transient: (set: HashSet) => void): HashSet; /** * The set of elements which are in both the first and second set, * * the hash and equal of the 2 sets has to be the same */ export declare function intersection_(l: HashSet, r: Iterable): HashSet; /** * The set of elements which are in both the first and second set * * @ets_data_first intersection_ */ export declare function intersection(r: Iterable): (l: HashSet) => HashSet; /** * Projects a Set through a function */ export declare function map_(set: HashSet, f: (x: A) => B): HashSet; /** * Projects a Set through a function * * @ets_data_first map_ */ export declare function map(f: (x: A) => B): (set: HashSet) => HashSet; /** * true if one or more elements match predicate * * @ets_data_first some_ */ export declare function some(predicate: Predicate): (set: HashSet) => boolean; /** * true if one or more elements match predicate */ export declare function some_(set: HashSet, predicate: Predicate): boolean; /** * Calculate the number of keys pairs in a set */ export declare function size(set: HashSet): number; /** * Creates an equal for a set */ export declare function equal(): Equal>; /** * true if all elements match predicate * * @ets_data_first every_ */ export declare function every(predicate: Predicate): (set: HashSet) => boolean; /** * true if all elements match predicate */ export declare function every_(set: HashSet, predicate: Predicate): boolean; /** * Map + Flatten * * @ets_data_first chain_ */ export declare function chain(f: (x: A) => Iterable): (set: HashSet) => HashSet; /** * Map + Flatten */ export declare function chain_(set: HashSet, f: (x: A) => Iterable): HashSet; /** * `true` if and only if every element in the first set is an element of the second set, * * the hash and equal of the 2 sets has to be the same * * @ets_data_first isSubset_ */ export declare function isSubset(y: HashSet): (x: HashSet) => boolean; /** * `true` if and only if every element in the first set is an element of the second set, * * the hash and equal of the 2 sets has to be the same */ export declare function isSubset_(x: HashSet, y: HashSet): boolean; /** * Filter set values using predicate * * @ets_data_first filter_ */ export declare function filter(refinement: Refinement): (set: HashSet) => HashSet; export declare function filter(predicate: Predicate): (set: HashSet) => HashSet; /** * Filter set values using predicate */ export declare function filter_(set: HashSet, refinement: Refinement): HashSet; export declare function filter_(set: HashSet, predicate: Predicate): HashSet; /** * Partition set values using predicate * * @ets_data_first partition_ */ export declare function partition(refinement: Refinement): (set: HashSet) => Tp.Tuple<[HashSet, HashSet]>; export declare function partition(predicate: Predicate): (set: HashSet) => Tp.Tuple<[HashSet, HashSet]>; /** * Partition set values using predicate */ export declare function partition_(set: HashSet, refinement: Refinement): Tp.Tuple<[HashSet, HashSet]>; export declare function partition_(set: HashSet, predicate: Predicate): Tp.Tuple<[HashSet, HashSet]>; /** * Mark `set` as mutable. */ export declare function beginMutation(set: HashSet): HashSet; /** * Mark `set` as immutable. */ export declare function endMutation(set: HashSet): HashSet; /** * Form the set difference (`x` - `y`) */ export declare function difference_(x: HashSet, y: Iterable): HashSet; /** * Form the set difference (`x` - `y`) * * @ets_data_first difference_ */ export declare function difference(y: Iterable): (x: HashSet) => HashSet; /** * Reduce a state over the map entries */ export declare function reduce_(set: HashSet, z: Z, f: (z: Z, v: V) => Z): Z; /** * Reduce a state over the map entries * * @ets_data_first reduce_ */ export declare function reduce(z: Z, f: (z: Z, v: V) => Z): (set: HashSet) => Z; /** * If element is present remove it, if not add it * * @ets_data_first toggle_ */ export declare function toggle(a: A): (set: HashSet) => HashSet; /** * If element is present remove it, if not add it */ export declare function toggle_(set: HashSet, a: A): HashSet; /** * Form the union of two sets, * * the hash and equal of the 2 sets has to be the same */ export declare function union_(l: HashSet, r: Iterable): HashSet; /** * Form the union of two sets, * * the hash and equal of the 2 sets has to be the same * * @ets_data_first union_ */ export declare function union(y: Iterable): (x: HashSet) => HashSet; //# sourceMappingURL=index.d.ts.map