/**
* @since 2.5.0
*/
import { Either } from './Either'
import { Eq } from './Eq'
import { Magma } from './Magma'
import { Monoid } from './Monoid'
import { Option } from './Option'
import { Ord } from './Ord'
import { Predicate } from './Predicate'
import { Refinement } from './Refinement'
import { Semigroup } from './Semigroup'
import { Separated } from './Separated'
import { Show } from './Show'
/**
* @category conversions
* @since 2.5.0
*/
export declare const fromSet: (s: Set) => ReadonlySet
/**
* Create a set with one element
*
* @category constructors
* @since 2.5.0
*/
export declare const singleton: (a: A) => ReadonlySet
/**
* Create a `ReadonlySet` from a `ReadonlyArray`
*
* @category conversions
* @since 2.10.0
*/
export declare const fromReadonlyArray: (E: Eq) => (as: readonly A[]) => ReadonlySet
/**
* @category conversions
* @since 2.5.0
*/
export declare function toSet(s: ReadonlySet): Set
/**
* Projects a Set through a function
*
* @since 2.5.0
*/
export declare function map(E: Eq): (f: (x: A) => B) => (set: ReadonlySet) => ReadonlySet
/**
* @since 2.5.0
*/
export declare function chain(E: Eq): (f: (x: A) => ReadonlySet) => (set: ReadonlySet) => ReadonlySet
/**
* @since 2.5.0
*/
export declare function filter(refinement: Refinement): (set: ReadonlySet) => ReadonlySet
export declare function filter(predicate: Predicate): (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>
export declare function partition(
predicate: Predicate
): (set: ReadonlySet) => Separated, ReadonlySet>
/**
* Form the union of two sets
*
* @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
*
* @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 * as N from 'fp-ts/number'
* import { pipe } from 'fp-ts/function'
*
* assert.deepStrictEqual(pipe(new Set([1, 2]), difference(N.Eq)(new Set([1, 3]))), new Set([2]))
*
* @since 2.5.0
*/
export declare function difference(E: Eq): {
(that: ReadonlySet): (me: ReadonlySet) => ReadonlySet
(me: ReadonlySet, that: ReadonlySet): ReadonlySet
}
/**
* @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
/**
* @category folding
* @since 2.11.0
*/
export declare const reduceRight: (O: Ord) => (b: B, f: (a: A, b: B) => B) => (fa: ReadonlySet) => B
/**
* Insert a value into a set
*
* @since 2.5.0
*/
export declare function insert(E: Eq): (a: A) => (set: ReadonlySet) => ReadonlySet
/**
* Delete a value from a set
*
* @since 2.5.0
*/
export declare const remove: (E: Eq) => (a: A) => (set: ReadonlySet) => ReadonlySet
/**
* Checks an element is a member of a set;
* If yes, removes the value from the set
* If no, inserts the value to the set
*
* @since 2.10.0
*/
export declare const toggle: (E: Eq) => (a: A) => (set: ReadonlySet) => ReadonlySet
/**
* @since 2.5.0
*/
export declare const compact: (E: Eq) => (fa: ReadonlySet