import "../../../Operator/index.js"; import type { Equal } from "../../../Equal/index.js"; import type { Predicate, Refinement } from "../../../Function/index.js"; import type { Ord } from "../../../Ord/index.js"; import * as St from "../../../Structural/index.js"; import * as RB from "../RedBlackTree/index.js"; import * as Tp from "../Tuple/index.js"; export declare class SortedSet implements Iterable { readonly keyTree: RB.RedBlackTree; constructor(keyTree: RB.RedBlackTree); [Symbol.iterator](): Iterator; get [St.hashSym](): number; [St.equalsSym](that: unknown): boolean; } export declare function make(K: Ord): SortedSet; export declare function add_(set: SortedSet, v: V): SortedSet; export declare function add(v: V): (set: SortedSet) => SortedSet; export declare function remove_(set: SortedSet, v: V): SortedSet; export declare function remove(v: V): (set: SortedSet) => SortedSet; export declare function values(set: SortedSet): IterableIterator; export declare function has_(set: SortedSet, v: V): boolean; /** * Apply f to each element */ export declare function forEach_(map: SortedSet, f: (v: V) => void): void; /** * 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: SortedSet, r: Iterable): SortedSet; /** * The set of elements which are in both the first and second set * * @ets_data_first intersection_ */ export declare function intersection(r: Iterable): (l: SortedSet) => SortedSet; /** * Projects a Set through a function */ export declare function map_(E: Ord): (set: SortedSet, f: (x: A) => B) => SortedSet; /** * Projects a Set through a function * * @ets_data_first map_ */ export declare function map(E: Ord): (f: (x: A) => B) => (set: SortedSet) => SortedSet; /** * true if one or more elements match predicate * * @ets_data_first some_ */ export declare function some(predicate: Predicate): (set: SortedSet) => boolean; /** * true if one or more elements match predicate */ export declare function some_(set: SortedSet, predicate: Predicate): boolean; /** * Calculate the number of keys pairs in a set */ export declare function size(set: SortedSet): 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: SortedSet) => boolean; /** * true if all elements match predicate */ export declare function every_(set: SortedSet, predicate: Predicate): boolean; /** * Map + Flatten * * @ets_data_first chain_ */ export declare function chain(E: Ord): (f: (x: A) => Iterable) => (set: SortedSet) => SortedSet; /** * Map + Flatten */ export declare function chain_(E: Ord): (set: SortedSet, f: (x: A) => Iterable) => SortedSet; /** * `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: SortedSet): (x: SortedSet) => 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: SortedSet, y: SortedSet): boolean; /** * Filter set values using predicate * * @ets_data_first filter_ */ export declare function filter(refinement: Refinement): (set: SortedSet) => SortedSet; export declare function filter(predicate: Predicate): (set: SortedSet) => SortedSet; /** * Filter set values using predicate */ export declare function filter_(set: SortedSet, refinement: Refinement): SortedSet; export declare function filter_(set: SortedSet, predicate: Predicate): SortedSet; /** * Partition set values using predicate * * @ets_data_first partition_ */ export declare function partition(refinement: Refinement): (set: SortedSet) => Tp.Tuple<[SortedSet, SortedSet]>; export declare function partition(predicate: Predicate): (set: SortedSet) => Tp.Tuple<[SortedSet, SortedSet]>; /** * Partition set values using predicate */ export declare function partition_(set: SortedSet, refinement: Refinement): Tp.Tuple<[SortedSet, SortedSet]>; export declare function partition_(set: SortedSet, predicate: Predicate): Tp.Tuple<[SortedSet, SortedSet]>; /** * Form the set difference (`x` - `y`) */ export declare function difference_(x: SortedSet, y: Iterable): SortedSet; /** * Form the set difference (`x` - `y`) * * @ets_data_first difference_ */ export declare function difference(y: Iterable): (x: SortedSet) => SortedSet; /** * Reduce a state over the map entries */ export declare function reduce_(set: SortedSet, 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: SortedSet) => Z; /** * If element is present remove it, if not add it * * @ets_data_first toggle_ */ export declare function toggle(a: A): (set: SortedSet) => SortedSet; /** * If element is present remove it, if not add it */ export declare function toggle_(set: SortedSet, a: A): SortedSet; /** * Form the union of two sets, * * the hash and equal of the 2 sets has to be the same */ export declare function union_(l: SortedSet, r: Iterable): SortedSet; /** * 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: SortedSet) => SortedSet; //# sourceMappingURL=index.d.ts.map