/**
* @since 2.5.0
*/
import { Either } from './Either'
import { Monoid } from './Monoid'
import { Ord } from './Ord'
import { Semigroup } from './Semigroup'
import { Eq } from './Eq'
import { Predicate, Refinement } from './function'
import { Separated } from './Compactable'
import { Option } from './Option'
import { Show } from './Show'
/**
* @category constructors
* @since 2.5.0
*/
export declare function fromSet(s: Set): ReadonlySet
/**
* @category destructors
* @since 2.5.0
*/
export declare function toSet(s: ReadonlySet): Set
/**
* @category instances
* @since 2.5.0
*/
export declare function getShow(S: Show): Show>
/**
* @since 2.5.0
*/
export declare const empty: ReadonlySet
/**
* @category destructors
* @since 2.5.0
*/
export declare function toReadonlyArray(O: Ord): (set: ReadonlySet) => ReadonlyArray
/**
* @category instances
* @since 2.5.0
*/
export declare function getEq(E: Eq): Eq>
/**
* @since 2.5.0
*/
export declare function some(predicate: Predicate): (set: ReadonlySet) => boolean
/**
* Projects a Set through a function
*
* @category combinators
* @since 2.5.0
*/
export declare function map(E: Eq): (f: (x: A) => B) => (set: ReadonlySet) => ReadonlySet
/**
* @since 2.5.0
*/
export declare function every(predicate: Predicate): (set: ReadonlySet) => boolean
/**
* @category combinators
* @since 2.5.0
*/
export declare function chain(E: Eq): (f: (x: A) => ReadonlySet) => (set: ReadonlySet) => ReadonlySet
/**
* `true` if and only if every element in the first set is an element of the second set
*
* @since 2.5.0
*/
export declare function isSubset(
E: Eq
): {
(that: ReadonlySet): (me: ReadonlySet) => boolean
(me: ReadonlySet, that: ReadonlySet): boolean
}
/**
* @category combinators
* @since 2.5.0
*/
export declare function filter(refinement: Refinement): (set: ReadonlySet) => ReadonlySet
export declare function filter(predicate: Predicate): (set: ReadonlySet) => ReadonlySet
/**
* @since 2.5.0
*/
export declare function partition(
refinement: Refinement
): (set: ReadonlySet) => Separated, ReadonlySet>
export declare function partition(
predicate: Predicate
): (set: ReadonlySet) => Separated, ReadonlySet>
/**
* Test if a value is a member of a set
*
* @since 2.5.0
*/
export declare function elem(
E: Eq
): {
(a: A): (set: ReadonlySet) => boolean
(a: A, set: ReadonlySet): boolean
}
/**
* Form the union of two sets
*
* @category combinators
* @since 2.5.0
*/
export declare function union(
E: Eq
): {
(that: ReadonlySet): (me: ReadonlySet) => ReadonlySet
(me: ReadonlySet, that: ReadonlySet): ReadonlySet
}
/**
* The set of elements which are in both the first and second set
*
* @category combinators
* @since 2.5.0
*/
export declare function intersection(
E: Eq
): {
(that: ReadonlySet): (me: ReadonlySet) => ReadonlySet
(me: ReadonlySet, that: ReadonlySet): ReadonlySet
}
/**
* @since 2.5.0
*/
export declare function partitionMap(
EB: Eq,
EC: Eq
): (f: (a: A) => Either) => (set: ReadonlySet) => Separated, ReadonlySet>
/**
* Form the set difference (`x` - `y`)
*
* @example
* import { difference } from 'fp-ts/ReadonlySet'
* import { eqNumber } from 'fp-ts/Eq'
* import { pipe } from 'fp-ts/function'
*
* assert.deepStrictEqual(pipe(new Set([1, 2]), difference(eqNumber)(new Set([1, 3]))), new Set([2]))
*
* @category combinators
* @since 2.5.0
*/
export declare function difference(
E: Eq
): {
(that: ReadonlySet): (me: ReadonlySet) => ReadonlySet
(me: ReadonlySet, that: ReadonlySet): ReadonlySet
}
/**
* @category instances
* @since 2.5.0
*/
export declare function getUnionMonoid(E: Eq): Monoid>
/**
* @category instances
* @since 2.5.0
*/
export declare function getIntersectionSemigroup(E: Eq): Semigroup>
/**
* @since 2.5.0
*/
export declare function reduce(O: Ord): (b: B, f: (b: B, a: A) => B) => (fa: ReadonlySet) => B
/**
* @since 2.5.0
*/
export declare function foldMap(O: Ord, M: Monoid): (f: (a: A) => M) => (fa: ReadonlySet) => M
/**
* Create a set with one element
*
* @category constructors
* @since 2.5.0
*/
export declare function singleton(a: A): ReadonlySet
/**
* Insert a value into a set
*
* @category combinators
* @since 2.5.0
*/
export declare function insert(E: Eq): (a: A) => (set: ReadonlySet) => ReadonlySet
/**
* Delete a value from a set
*
* @category combinators
* @since 2.5.0
*/
export declare function remove(E: Eq): (a: A) => (set: ReadonlySet) => ReadonlySet
/**
* Create a set from an array
*
* @category constructors
* @since 2.5.0
*/
export declare function fromArray(E: Eq): (as: ReadonlyArray) => ReadonlySet
/**
* @category combinators
* @since 2.5.0
*/
export declare function compact(E: Eq): (fa: ReadonlySet