Collections.Set<'T> Class (F#)
Immutable sets based on binary trees, where comparison is the F# structural comparison function, potentially using implementations of the IComparable interface on key values.
Namespace/Module Path: Microsoft.FSharp.Collections
Assembly: FSharp.Core (in FSharp.Core.dll)
[<Sealed>] type Set<[<EqualityConditionalOnAttribute>] 'T (requires comparison)> = class interface IComparable interface IEnumerable interface IEnumerable interface ICollection new Set : seq<'T> -> Set<'T> member this.Add : 'T -> Set<'T> member this.Contains : 'T -> bool member this.IsProperSubsetOf : Set<'T> -> bool member this.IsProperSupersetOf : Set<'T> -> bool member this.IsSubsetOf : Set<'T> -> bool member this.IsSupersetOf : Set<'T> -> bool member this.Remove : 'T -> Set<'T> member this.Count : int member this.IsEmpty : bool member this.MaximumElement : 'T member this.MinimumElement : 'T static member ( + ) : Set<'T> * Set<'T> -> Set<'T> static member ( - ) : Set<'T> * Set<'T> -> Set<'T> end
|
Member |
Description |
|---|---|
|
A useful shortcut for Set.add. Note this operation produces a new set and does not mutate the original set. The new set will share many storage nodes with the original. |
|
|
A useful shortcut for Set.contains. See the Set module for further operations on sets. |
|
|
The number of elements in the set |
|
|
A useful shortcut for Set.isEmpty. |
|
|
Evaluates to true if all elements of the first set are in the second, and at least one element of the second is not in the first. |
|
|
Evaluates to true if all elements of the second set are in the first, and at least one element of the first is not in the second. |
|
|
Evaluates to true if all elements of the first set are in the second. |
|
|
Evaluates to true if all elements of the second set are in the first. |
|
|
Returns the highest element in the set according to the ordering being used for the set. |
|
|
Returns the lowest element in the set according to the ordering being used for the set. |
|
|
A useful shortcut for Set.remove. Note this operation produces a new set and does not mutate the original set. The new set will share many storage nodes with the original. |