import "../../../Operator/index.js";
import type { Option } from "@effect-ts/system/Option";
import type { MutableSet } from "@effect-ts/system/Support/Mutable";
import type { Associative } from "../../../Associative/index.js";
import type { Either } from "../../../Either/index.js";
import type { Equal } from "../../../Equal/index.js";
import type { Predicate, Refinement } from "../../../Function/index.js";
import type { Identity } from "../../../Identity/index.js";
import type { Ord } from "../../../Ord/index.js";
import type { Show } from "../../../Show/index.js";
import * as Tp from "../Tuple/index.js";
export declare type Set = ReadonlySet;
export declare const empty: Set;
/**
* Get an Associative that performs Set intersection
*/
export declare function getIntersectionAssociative(E: Equal): Associative>;
/**
* Get an Identity that performs Set union
*/
export declare function getUnionIdentity(E: Equal): Identity>;
/**
* The set of elements which are in both the first and second set
*/
export declare function intersection_(E: Equal): (l: Set, r: Set) => Set;
/**
* The set of elements which are in both the first and second set
*/
export declare function intersection(E: Equal): (r: Set) => (l: Set) => Set;
/**
* Convert a mutable set to a readonly one
*/
export declare function fromMutable(s: MutableSet): Set;
/**
* Convert a set to a mutable one
*/
export declare function toMutable(s: Set): MutableSet;
/**
* get Show for set given Show for values
*/
export declare function getShow(S: Show): Show>;
/**
* Convert a set to an Array
*/
export declare function toArray(O: Ord): (set: Set) => ReadonlyArray;
/**
* Convert a set to an Array
*/
export declare function toArray_(x: Set, O: Ord): ReadonlyArray;
/**
* Get Equal for Setgiven Equal for element
*/
export declare function getEqual(E: Equal): Equal>;
/**
* true if one or more elements match predicate
*/
export declare function some(predicate: Predicate): (set: Set) => boolean;
/**
* true if one or more elements match predicate
*/
export declare function some_(set: Set, predicate: Predicate): boolean;
/**
* Projects a Set through a function
*/
export declare function map(E: Equal): (f: (x: A) => B) => (set: Set) => Set;
/**
* Projects a Set through a function
*/
export declare function map_(E: Equal): (set: Set, f: (x: A) => B) => Set;
/**
* true if all elements match predicate
*/
export declare function every(predicate: Predicate): (set: Set) => boolean;
/**
* true if all elements match predicate
*/
export declare function every_(set: Set, predicate: Predicate): boolean;
/**
* Map + Flatten
*/
export declare function chain(E: Equal): (f: (x: A) => Set) => (set: Set) => Set;
/**
* Map + Flatten
*/
export declare function chain_(E: Equal): (set: Set, f: (x: A) => Set) => Set;
/**
* `true` if and only if every element in the first set is an element of the second set
*/
export declare function isSubset(E: Equal): (y: Set) => (x: Set) => boolean;
/**
* `true` if and only if every element in the first set is an element of the second set
*/
export declare function isSubset_(E: Equal): (x: Set, y: Set) => boolean;
/**
* Filter set values using predicate
*/
export declare function filter(refinement: Refinement): (set: Set) => Set;
export declare function filter(predicate: Predicate): (set: Set) => Set;
/**
* Filter set values using predicate
*/
export declare function filter_(set: Set, refinement: Refinement): Set;
export declare function filter_(set: Set, predicate: Predicate): Set;
/**
* Partition set values using predicate
*/
export declare function partition(refinement: Refinement): (set: Set) => Tp.Tuple<[Set, Set]>;
export declare function partition(predicate: Predicate): (set: Set) => Tp.Tuple<[Set, Set]>;
/**
* Partition set values using predicate
*/
export declare function partition_(set: Set, refinement: Refinement): Tp.Tuple<[Set, Set]>;
export declare function partition_(set: Set, predicate: Predicate): Tp.Tuple<[Set, Set]>;
/**
* Test if a value is a member of a set
*/
export declare function elem_(E: Equal): (set: Set, a: A) => boolean;
/**
* Test if a value is a member of a set
*/
export declare function elem(E: Equal): (a: A) => (set: Set) => boolean;
/**
* Partition elements according to f
*/
export declare function partitionMap(EB: Equal, EC: Equal): (f: (a: A) => Either) => (set: Set) => Tp.Tuple<[Set, Set]>;
/**
* Partition elements according to f
*/
export declare function partitionMap_(EB: Equal, EC: Equal): (set: Set, f: (a: A) => Either) => Tp.Tuple<[Set, Set]>;
/**
* Form the set difference (`x` - `y`)
*/
export declare function difference_(E: Equal): (l: Set, r: Set) => Set;
/**
* Form the set difference (`x` - `y`)
*/
export declare function difference(E: Equal): (y: Set) => (x: Set) => Set;
/**
* Reduce over the set values
*/
export declare function reduce(O: Ord): (b: B, f: (b: B, a: A) => B) => (fa: Set) => B;
/**
* Reduce over the set values
*/
export declare function reduce_(O: Ord): (fa: Set, b: B, f: (b: B, a: A) => B) => B;
/**
* Fold + Map
*/
export declare function foldMap(O: Ord, M: Identity): (f: (a: A) => M) => (fa: Set) => M;
/**
* Fold + Map
*/
export declare function foldMap_(O: Ord, M: Identity): (fa: Set, f: (a: A) => M) => M;
/**
* Create a set with one element
*/
export declare function singleton(a: A): Set;
/**
* Insert a value into a set
*/
export declare function insert(E: Equal): (a: A) => (set: Set) => Set;
/**
* Insert a value into a set
*/
export declare function insert_(E: Equal): (set: Set, a: A) => Set;
/**
* Delete a value from a set
*/
export declare function remove(E: Equal): (a: A) => (set: Set) => Set;
/**
* Delete a value from a set
*/
export declare function remove_(E: Equal): (set: Set, a: A) => Set;
/**
* If element is present remove it, if not add it
*/
export declare function toggle(E: Equal): (a: A) => (set: Set) => Set;
/**
* If element is present remove it, if not add it
*/
export declare function toggle_(E: Equal): (set: Set, a: A) => Set;
/**
* Create a set from an array
*/
export declare function fromArray(E: Equal): (as: ReadonlyArray) => Set;
/**
* Set compaction, remove none
*/
export declare function compact(E: Equal): (fa: Set