[Home] Module Microsoft.FSharp.Collections.Set


Values

ValueDescription
val add : 'a -> Set<'a> -> Set<'a>
Return a new set with an element added to the set. No exception is raised if the set already contains the given element.
val choose : Set<'a> -> 'a
Choose an arbitrary element from a set
val compare : Set<'a> -> Set<'a> -> int
Compare two sets. Places sets into a total order.
val count : Set<'a> -> int
Return the number of elements in the set. Same as "size"
val diff : Set<'a> -> Set<'a> -> Set<'a>
Return a new set with the elements of the second set removed from the first.
[<GeneralizableValueAttribute ()>]
val empty<'a> : Set<'a>
The empty set.
val equal : Set<'a> -> Set<'a> -> bool
Test if two sets are equal
val exists : ('a -> bool) -> Set<'a> -> bool
Test if any element of the collection satisfies the given predicate. If the elements are i0...iN then computes "p i0 or ... or p iN".
val filter : ('a -> bool) -> Set<'a> -> Set<'a>
Return a new collection containing only the elements of the collection for which the given predicate returns "true"
val fold_left : ('state -> 'a -> 'state) -> 'state -> Set<'a> -> 'state
Apply the given accumulating function to all the elements of the set
val fold_right : ('a -> 'state -> 'state) -> Set<'a> -> 'state -> 'state
Apply the given accumulating function to all the elements of the set
val for_all : ('a -> bool) -> Set<'a> -> bool
Test if all elements of the collection satisfy the given predicate. If the elements are i0...iN and "j0...jN" then computes "p i0 && ... && p iN".
val intersect : Set<'a> -> Set<'a> -> Set<'a>
Compute the intersection of the two sets.
val intersect_all : seq<Set<'a>> -> Set<'a>
Compute the intersection of a sequence of sets. The sequence must be non-empty
val is_empty : Set<'a> -> bool
Return "true" if the set is empty
val iter : ('a -> unit) -> Set<'a> -> unit
Apply the given function to each element of the set, in order according to the comparison function
val map : ('a -> 'b) -> Set<'a> -> Set<'b>
Return a new collection containing the results of applying the given function to each element of the input set
val max_elt : Set<'a> -> 'a
Returns the highest element in the set according to the ordering being used for the set
val mem : 'a -> Set<'a> -> bool
Evaluates to "true" if the given element is in the given set
val min_elt : Set<'a> -> 'a
Returns the lowest element in the set according to the ordering being used for the set
val next_elt : 'a -> Set<'a> -> 'a option
Returns the least element in the set that is greater than the given key according to the ordering being used for the set
val of_array : 'a array -> Set<'a>
Build a set that contains the same elements as the given array
val of_list : 'a list -> Set<'a>
Build a set that contains the same elements as the given list
val of_seq : seq<'a> -> Set<'a>
Build a new collection from the given enumerable object
val partition : ('a -> bool) -> Set<'a> -> Set<'a> * Set<'a>
Split the set into two sets containing the elements for which the given predicate returns true and false respectively
val prev_elt : 'a -> Set<'a> -> 'a option
Returns the greatest element in the set that is less than the given key according to the ordering being used for the set
val remove : 'a -> Set<'a> -> Set<'a>
Return a new set with the given element removed. No exception is raised in the set doesn't contain the given element.
val singleton : 'a -> Set<'a>
The set containing the given one element.
val size : Set<'a> -> int
Return the number of elements in the set
val subset : Set<'a> -> Set<'a> -> bool
Evaluates to "true" if all elements of the first set are in the second
val to_array : Set<'a> -> 'a array
Build an array that contains the elements of the set in order
val to_list : Set<'a> -> 'a list
Build a list that contains the elements of the set in order
val to_seq : Set<'a> -> seq<'a>
Return a view of the collection as an enumerable object
val union : Set<'a> -> Set<'a> -> Set<'a>
Compute the union of the two sets.
val union_all : seq<Set<'a>> -> Set<'a>
Compute the union of a sequence of sets.

See Also

Microsoft.FSharp.Collections


Documentation for assembly FSharp.Core, version 1.9.6.0, generated using F# Programming Language version 1.9.6.0