Set Class

Immutable set module AVL tree implementation AVL tree is a self-balancing binary search tree. http://en.wikipedia.org/wiki/AVL_tree

DECLARATION
public static partial class Set
NAMESPACE
LanguageExt

Methods

add<OrdT, T>(Set<OrdT, T>, T)
SUMMARY

Add an item to the set

PARAMETERS
set
Set<OrdT, T>
Set to add item to
value
T
Value to add to the set
DECLARATION
[Pure]
public static Set<OrdT, T> add<OrdT, T>(Set<OrdT, T> set, T value)
RETURNS
Set<OrdT, T>
New set with the item added
CONSTRAINTS
where OrdT : struct Ord<T>
add<T>(Set<T>, T)
SUMMARY

Add an item to the set

PARAMETERS
set
Set<T>
Set to add item to
value
T
Value to add to the set
DECLARATION
[Pure]
public static Set<T> add<T>(Set<T> set, T value)
RETURNS
Set<T>
New set with the item added
addOrUpdate<OrdT, T>(Set<OrdT, T>, T)
SUMMARY

Add an item to the set. If an item already exists then replace it.

PARAMETERS
set
Set<OrdT, T>
Set to add item to
value
T
Value to add to the set
DECLARATION
[Pure]
public static Set<OrdT, T> addOrUpdate<OrdT, T>(Set<OrdT, T> set, T value)
RETURNS
Set<OrdT, T>
New set with the item maybe added
CONSTRAINTS
where OrdT : struct Ord<T>
addOrUpdate<T>(Set<T>, T)
SUMMARY

Add an item to the set. If an item already exists then replace it.

PARAMETERS
set
Set<T>
Set to add item to
value
T
Value to add to the set
DECLARATION
[Pure]
public static Set<T> addOrUpdate<T>(Set<T> set, T value)
RETURNS
Set<T>
New set with the item maybe added
addOrUpdateRange<A>(Set<A>, IEnumerable<A>)
SUMMARY

Atomically adds a range of items to the set. If any items already exist, they're ignored.

PARAMETERS
set
Set<A>
range
IEnumerable<A>
Range of keys to add
REMARKS
Null is not allowed for a Key
DECLARATION
[Pure]
public static Set<A> addOrUpdateRange<A>(Set<A> set, IEnumerable<A> range)
RETURNS
Set<A>
New Set with the items added
EXCEPTIONS
ArgumentException
Throws ArgumentException if any of the keys already exist
ArgumentNullException
Throws ArgumentNullException if any of the keys are null
addOrUpdateRange<OrdT, T>(Set<OrdT, T>, IEnumerable<T>)
SUMMARY

Atomically adds a range of items to the set. If any items already exist, they're ignored.

PARAMETERS
set
Set<OrdT, T>
range
IEnumerable<T>
Range of keys to add
REMARKS
Null is not allowed for a Key
DECLARATION
[Pure]
public static Set<OrdT, T> addOrUpdateRange<OrdT, T>(Set<OrdT, T> set, IEnumerable<T> range)
RETURNS
Set<OrdT, T>
New Set with the items added
CONSTRAINTS
where OrdT : struct Ord<T>
EXCEPTIONS
ArgumentException
Throws ArgumentException if any of the keys already exist
ArgumentNullException
Throws ArgumentNullException if any of the keys are null
addRange<A>(Set<A>, IEnumerable<A>)
SUMMARY

Atomically adds a range of items to the set.

PARAMETERS
set
Set<A>
range
IEnumerable<A>
Range of keys to add
REMARKS
Null is not allowed for a Key
DECLARATION
[Pure]
public static Set<A> addRange<A>(Set<A> set, IEnumerable<A> range)
RETURNS
Set<A>
New Set with the items added
EXCEPTIONS
ArgumentException
Throws ArgumentException if any of the keys already exist
ArgumentNullException
Throws ArgumentNullException if any of the keys are null
addRange<OrdT, T>(Set<OrdT, T>, IEnumerable<T>)
SUMMARY

Atomically adds a range of items to the set.

PARAMETERS
set
Set<OrdT, T>
range
IEnumerable<T>
Range of keys to add
REMARKS
Null is not allowed for a Key
DECLARATION
[Pure]
public static Set<OrdT, T> addRange<OrdT, T>(Set<OrdT, T> set, IEnumerable<T> range)
RETURNS
Set<OrdT, T>
New Set with the items added
CONSTRAINTS
where OrdT : struct Ord<T>
EXCEPTIONS
ArgumentException
Throws ArgumentException if any of the keys already exist
ArgumentNullException
Throws ArgumentNullException if any of the keys are null
contains<OrdT, T>(Set<OrdT, T>, T)
SUMMARY

Returns True if the value is in the set

PARAMETERS
set
Set<OrdT, T>
Set
value
T
Value to check
DECLARATION
[Pure]
public static bool contains<OrdT, T>(Set<OrdT, T> set, T value)
RETURNS
bool
True if the item 'value' is in the Set 'set'
CONSTRAINTS
where OrdT : struct Ord<T>
contains<T>(Set<T>, T)
SUMMARY

Returns True if the value is in the set

PARAMETERS
set
Set<T>
Set
value
T
Value to check
DECLARATION
[Pure]
public static bool contains<T>(Set<T> set, T value)
RETURNS
bool
True if the item 'value' is in the Set 'set'
create<OrdT, T>()
SUMMARY

Create a new empty set

DECLARATION
[Pure]
public static Set<OrdT, T> create<OrdT, T>()
RETURNS
Set<OrdT, T>
Empty set
CONSTRAINTS
where OrdT : struct Ord<T>
create<T>()
SUMMARY

Create a new empty set

DECLARATION
[Pure]
public static Set<T> create<T>()
RETURNS
Set<T>
Empty set
createRange<OrdT, T>(IEnumerable<T>)
SUMMARY

Create a new set pre-populated with the items in range

PARAMETERS
range
IEnumerable<T>
Range of items
DECLARATION
[Pure]
public static Set<OrdT, T> createRange<OrdT, T>(IEnumerable<T> range)
RETURNS
Set<OrdT, T>
Set
CONSTRAINTS
where OrdT : struct Ord<T>
createRange<T>(IEnumerable<T>)
SUMMARY

Create a new set pre-populated with the items in range

PARAMETERS
range
IEnumerable<T>
Range of items
DECLARATION
[Pure]
public static Set<T> createRange<T>(IEnumerable<T> range)
RETURNS
Set<T>
Set
empty<OrdT, T>()
SUMMARY

Create a new empty set

DECLARATION
[Pure]
public static Set<OrdT, T> empty<OrdT, T>()
RETURNS
Set<OrdT, T>
Empty set
CONSTRAINTS
where OrdT : struct Ord<T>
empty<T>()
SUMMARY

Create a new empty set

DECLARATION
[Pure]
public static Set<T> empty<T>()
RETURNS
Set<T>
Empty set
equals<OrdT, T>(Set<OrdT, T>, Set<OrdT, T>)
SUMMARY

Returns true if both sets contain the same elements

PARAMETERS
setA
Set<OrdT, T>
setB
Set<OrdT, T>
DECLARATION
[Pure]
public static bool equals<OrdT, T>(Set<OrdT, T> setA, Set<OrdT, T> setB)
RETURNS
bool
CONSTRAINTS
where OrdT : struct Ord<T>
equals<T>(Set<T>, Set<T>)
SUMMARY

Returns true if both sets contain the same elements

PARAMETERS
setA
Set<T>
setB
Set<T>
DECLARATION
[Pure]
public static bool equals<T>(Set<T> setA, Set<T> setB)
RETURNS
bool
except<OrdT, T>(Set<OrdT, T>, Set<OrdT, T>)
SUMMARY

Returns this - other. Only the items in this that are not in other will be returned.

PARAMETERS
setA
Set<OrdT, T>
setB
Set<OrdT, T>
DECLARATION
[Pure]
public static Set<OrdT, T> except<OrdT, T>(Set<OrdT, T> setA, Set<OrdT, T> setB)
RETURNS
Set<OrdT, T>
CONSTRAINTS
where OrdT : struct Ord<T>
except<T>(Set<T>, IEnumerable<T>)
SUMMARY

Returns this - other. Only the items in this that are not in other will be returned.

PARAMETERS
setA
Set<T>
setB
IEnumerable<T>
DECLARATION
[Pure]
public static Set<T> except<T>(Set<T> setA, IEnumerable<T> setB)
RETURNS
Set<T>
exists<OrdT, T>(Set<OrdT, T>, Func<T, bool>)
SUMMARY

Check the existence of an item in the set using a predicate.

PARAMETERS
set
Set<OrdT, T>
Set
pred
Func<T, bool>
Predicate
REMARKS
Note this scans the entire set.
DECLARATION
[Pure]
public static bool exists<OrdT, T>(Set<OrdT, T> set, Func<T, bool> pred)
RETURNS
bool
True if predicate returns true for any item
CONSTRAINTS
where OrdT : struct Ord<T>
exists<T>(Set<T>, Func<T, bool>)
SUMMARY

Check the existence of an item in the set using a predicate.

PARAMETERS
set
Set<T>
Set
pred
Func<T, bool>
Predicate
REMARKS
Note this scans the entire set.
DECLARATION
[Pure]
public static bool exists<T>(Set<T> set, Func<T, bool> pred)
RETURNS
bool
True if predicate returns true for any item
filter<OrdT, T>(Set<OrdT, T>, Func<T, bool>)
SUMMARY

Filters items from the set using the predicate. If the predicate returns True for any item then it remains in the set, otherwise it's dropped.

PARAMETERS
set
Set<OrdT, T>
Set
pred
Func<T, bool>
Predicate
DECLARATION
[Pure]
public static Set<OrdT, T> filter<OrdT, T>(Set<OrdT, T> set, Func<T, bool> pred)
RETURNS
Set<OrdT, T>
Filtered enumerable
CONSTRAINTS
where OrdT : struct Ord<T>
filter<T>(Set<T>, Func<T, bool>)
SUMMARY

Filters items from the set using the predicate. If the predicate returns True for any item then it remains in the set, otherwise it's dropped.

PARAMETERS
set
Set<T>
Set
pred
Func<T, bool>
Predicate
DECLARATION
[Pure]
public static Set<T> filter<T>(Set<T> set, Func<T, bool> pred)
RETURNS
Set<T>
Filtered enumerable
find<OrdT, T>(Set<OrdT, T>, T)
SUMMARY

Attempts to find an item in the set.

PARAMETERS
set
Set<OrdT, T>
Set
value
T
Value to find
DECLARATION
[Pure]
public static Option<T> find<OrdT, T>(Set<OrdT, T> set, T value)
RETURNS
Option<T>
Some(T) if found, None otherwise
CONSTRAINTS
where OrdT : struct Ord<T>
find<T>(Set<T>, T)
SUMMARY

Attempts to find an item in the set.

PARAMETERS
set
Set<T>
Set
value
T
Value to find
DECLARATION
[Pure]
public static Option<T> find<T>(Set<T> set, T value)
RETURNS
Option<T>
Some(T) if found, None otherwise
fold<OrdT, T, S>(Set<OrdT, T>, S, Func<S, T, S>)
SUMMARY

Applies a function 'folder' to each element of the collection, threading an accumulator argument through the computation. The fold function takes the state argument, and applies the function 'folder' to it and the first element of the set. Then, it feeds this result into the function 'folder' along with the second element, and so on. It returns the final result. (Aggregate in LINQ)

PARAMETERS
set
Set<OrdT, T>
Set to fold
state
S
Initial state
folder
Func<S, T, S>
Fold function
DECLARATION
[Pure]
public static S fold<OrdT, T, S>(Set<OrdT, T> set, S state, Func<S, T, S> folder)
RETURNS
S
Aggregate value
CONSTRAINTS
where OrdT : struct Ord<T>
fold<T, S>(Set<T>, S, Func<S, T, S>)
SUMMARY

Applies a function 'folder' to each element of the collection, threading an accumulator argument through the computation. The fold function takes the state argument, and applies the function 'folder' to it and the first element of the set. Then, it feeds this result into the function 'folder' along with the second element, and so on. It returns the final result. (Aggregate in LINQ)

PARAMETERS
set
Set<T>
Set to fold
state
S
Initial state
folder
Func<S, T, S>
Fold function
DECLARATION
[Pure]
public static S fold<T, S>(Set<T> set, S state, Func<S, T, S> folder)
RETURNS
S
Aggregate value
foldBack<OrdT, T, S>(Set<OrdT, T>, S, Func<S, T, S>)
SUMMARY

Applies a function 'folder' to each element of the collection (from last element to first), threading an aggregate state through the computation. The fold function takes the state argument, and applies the function 'folder' to it and the first element of the set. Then, it feeds this result into the function 'folder' along with the second element, and so on. It returns the final result.

PARAMETERS
set
Set<OrdT, T>
Set to fold
state
S
Initial state
folder
Func<S, T, S>
Fold function
DECLARATION
[Pure]
public static S foldBack<OrdT, T, S>(Set<OrdT, T> set, S state, Func<S, T, S> folder)
RETURNS
S
Aggregate value
CONSTRAINTS
where OrdT : struct Ord<T>
foldBack<T, S>(Set<T>, S, Func<S, T, S>)
SUMMARY

Applies a function 'folder' to each element of the collection (from last element to first), threading an aggregate state through the computation. The fold function takes the state argument, and applies the function 'folder' to it and the first element of the set. Then, it feeds this result into the function 'folder' along with the second element, and so on. It returns the final result.

PARAMETERS
set
Set<T>
Set to fold
state
S
Initial state
folder
Func<S, T, S>
Fold function
DECLARATION
[Pure]
public static S foldBack<T, S>(Set<T> set, S state, Func<S, T, S> folder)
RETURNS
S
Aggregate value
intersect<OrdT, T>(Set<OrdT, T>, Set<OrdT, T>)
SUMMARY

Returns the elements that are in both setA and setB

PARAMETERS
setA
Set<OrdT, T>
setB
Set<OrdT, T>
DECLARATION
[Pure]
public static Set<OrdT, T> intersect<OrdT, T>(Set<OrdT, T> setA, Set<OrdT, T> setB)
RETURNS
Set<OrdT, T>
CONSTRAINTS
where OrdT : struct Ord<T>
intersect<T>(Set<T>, IEnumerable<T>)
SUMMARY

Returns the elements that are in both setA and setB

PARAMETERS
setA
Set<T>
setB
IEnumerable<T>
DECLARATION
[Pure]
public static Set<T> intersect<T>(Set<T> setA, IEnumerable<T> setB)
RETURNS
Set<T>
isEmpty<OrdT, T>(Set<OrdT, T>)
SUMMARY

True if the set has no elements

PARAMETERS
set
Set<OrdT, T>
DECLARATION
[Pure]
public static bool isEmpty<OrdT, T>(Set<OrdT, T> set)
RETURNS
bool
True if the set has no elements
CONSTRAINTS
where OrdT : struct Ord<T>
isEmpty<T>(Set<T>)
SUMMARY

True if the set has no elements

PARAMETERS
set
Set<T>
DECLARATION
[Pure]
public static bool isEmpty<T>(Set<T> set)
RETURNS
bool
True if the set has no elements
isProperSubset<OrdT, T>(Set<OrdT, T>, Set<OrdT, T>)
SUMMARY

Returns True if setB is a proper subset of setA

PARAMETERS
setA
Set<OrdT, T>
Set A
setB
Set<OrdT, T>
Set B
DECLARATION
[Pure]
public static bool isProperSubset<OrdT, T>(Set<OrdT, T> setA, Set<OrdT, T> setB)
RETURNS
bool
True is setB is a proper subset of setA
CONSTRAINTS
where OrdT : struct Ord<T>
isProperSubset<T>(Set<T>, IEnumerable<T>)
SUMMARY

Returns True if setB is a proper subset of setA

PARAMETERS
setA
Set<T>
Set A
setB
IEnumerable<T>
Set B
DECLARATION
[Pure]
public static bool isProperSubset<T>(Set<T> setA, IEnumerable<T> setB)
RETURNS
bool
True is setB is a proper subset of setA
isProperSuperset<OrdT, T>(Set<OrdT, T>, Set<OrdT, T>)
SUMMARY

Returns True if setB is a proper superset of setA

PARAMETERS
setA
Set<OrdT, T>
Set A
setB
Set<OrdT, T>
Set B
DECLARATION
[Pure]
public static bool isProperSuperset<OrdT, T>(Set<OrdT, T> setA, Set<OrdT, T> setB)
RETURNS
bool
True is setB is a proper subset of setA
CONSTRAINTS
where OrdT : struct Ord<T>
isProperSuperset<T>(Set<T>, IEnumerable<T>)
SUMMARY

Returns True if setB is a proper superset of setA

PARAMETERS
setA
Set<T>
Set A
setB
IEnumerable<T>
Set B
DECLARATION
[Pure]
public static bool isProperSuperset<T>(Set<T> setA, IEnumerable<T> setB)
RETURNS
bool
True is setB is a proper subset of setA
isSubset<OrdT, T>(Set<OrdT, T>, Set<OrdT, T>)
SUMMARY

Returns True if setB is a subset of setA

PARAMETERS
setA
Set<OrdT, T>
Set A
setB
Set<OrdT, T>
Set B
DECLARATION
[Pure]
public static bool isSubset<OrdT, T>(Set<OrdT, T> setA, Set<OrdT, T> setB)
RETURNS
bool
True is setB is a subset of setA
CONSTRAINTS
where OrdT : struct Ord<T>
isSubset<T>(Set<T>, IEnumerable<T>)
SUMMARY

Returns True if setB is a subset of setA

PARAMETERS
setA
Set<T>
Set A
setB
IEnumerable<T>
Set B
DECLARATION
[Pure]
public static bool isSubset<T>(Set<T> setA, IEnumerable<T> setB)
RETURNS
bool
True is setB is a subset of setA
isSuperset<OrdT, T>(Set<OrdT, T>, Set<OrdT, T>)
SUMMARY

Returns True if setB is a superset of setA

PARAMETERS
setA
Set<OrdT, T>
Set A
setB
Set<OrdT, T>
Set B
DECLARATION
[Pure]
public static bool isSuperset<OrdT, T>(Set<OrdT, T> setA, Set<OrdT, T> setB)
RETURNS
bool
True is setB is a superset of setA
CONSTRAINTS
where OrdT : struct Ord<T>
isSuperset<T>(Set<T>, IEnumerable<T>)
SUMMARY

Returns True if setB is a superset of setA

PARAMETERS
setA
Set<T>
Set A
setB
IEnumerable<T>
Set B
DECLARATION
[Pure]
public static bool isSuperset<T>(Set<T> setA, IEnumerable<T> setB)
RETURNS
bool
True is setB is a superset of setA
length<OrdT, T>(Set<OrdT, T>)
SUMMARY

Get the number of elements in the set

PARAMETERS
set
Set<OrdT, T>
Set
DECLARATION
[Pure]
public static int length<OrdT, T>(Set<OrdT, T> set)
RETURNS
int
Number of elements
CONSTRAINTS
where OrdT : struct Ord<T>
length<T>(Set<T>)
SUMMARY

Get the number of elements in the set

PARAMETERS
set
Set<T>
Set
DECLARATION
[Pure]
public static int length<T>(Set<T> set)
RETURNS
int
Number of elements
map<OrdT, OrdR, T, R>(Set<OrdT, T>, Func<T, R>)
SUMMARY

Maps the values of this set into a new set of values using the mapper function to tranform the source values.

PARAMETERS
set
Set<OrdT, T>
Set
mapper
Func<T, R>
Mapping function
DECLARATION
[Pure]
public static Set<OrdR, R> map<OrdT, OrdR, T, R>(Set<OrdT, T> set, Func<T, R> mapper)
RETURNS
Set<OrdR, R>
Mapped enumerable
CONSTRAINTS
where OrdT : struct Ord<T>
where OrdR : struct Ord<R>
map<OrdT, T>(Set<OrdT, T>, Func<T, T>)
SUMMARY

Maps the values of this set into a new set of values using the mapper function to tranform the source values.

PARAMETERS
set
Set<OrdT, T>
Set
mapper
Func<T, T>
Mapping function
DECLARATION
[Pure]
public static Set<OrdT, T> map<OrdT, T>(Set<OrdT, T> set, Func<T, T> mapper)
RETURNS
Set<OrdT, T>
Mapped enumerable
CONSTRAINTS
where OrdT : struct Ord<T>
map<T, R>(Set<T>, Func<T, R>)
SUMMARY

Maps the values of this set into a new set of values using the mapper function to tranform the source values.

PARAMETERS
set
Set<T>
Set
mapper
Func<T, R>
Mapping function
DECLARATION
[Pure]
public static Set<R> map<T, R>(Set<T> set, Func<T, R> mapper)
RETURNS
Set<R>
Mapped enumerable
overlaps<OrdT, T>(Set<OrdT, T>, Set<OrdT, T>)
SUMMARY

Returns True if setA overlaps setB

PARAMETERS
setA
Set<OrdT, T>
Set A
setB
Set<OrdT, T>
Set B
DECLARATION
[Pure]
public static bool overlaps<OrdT, T>(Set<OrdT, T> setA, Set<OrdT, T> setB)
RETURNS
bool
True if setA overlaps setB
CONSTRAINTS
where OrdT : struct Ord<T>
overlaps<T>(Set<T>, IEnumerable<T>)
SUMMARY

Returns True if setA overlaps setB

PARAMETERS
setA
Set<T>
Set A
setB
IEnumerable<T>
Set B
DECLARATION
[Pure]
public static bool overlaps<T>(Set<T> setA, IEnumerable<T> setB)
RETURNS
bool
True if setA overlaps setB
remove<OrdT, T>(Set<OrdT, T>, T)
SUMMARY

Removes an item from the set (if it exists)

PARAMETERS
set
Set<OrdT, T>
Set
value
T
Value to check
DECLARATION
[Pure]
public static Set<OrdT, T> remove<OrdT, T>(Set<OrdT, T> set, T value)
RETURNS
Set<OrdT, T>
New set with item removed
CONSTRAINTS
where OrdT : struct Ord<T>
remove<T>(Set<T>, T)
SUMMARY

Removes an item from the set (if it exists)

PARAMETERS
set
Set<T>
Set
value
T
Value to check
DECLARATION
[Pure]
public static Set<T> remove<T>(Set<T> set, T value)
RETURNS
Set<T>
New set with item removed
subtract<OrdT, T>(Set<OrdT, T>, Set<OrdT, T>)
SUMMARY

Returns setA - setB. Only the items in setA that are not in setB will be returned.

PARAMETERS
setA
Set<OrdT, T>
setB
Set<OrdT, T>
DECLARATION
[Pure]
public static Set<OrdT, T> subtract<OrdT, T>(Set<OrdT, T> setA, Set<OrdT, T> setB)
RETURNS
Set<OrdT, T>
CONSTRAINTS
where OrdT : struct Ord<T>
subtract<T>(Set<T>, Set<T>)
SUMMARY

Returns setA - setB. Only the items in setA that are not in setB will be returned.

PARAMETERS
setA
Set<T>
setB
Set<T>
DECLARATION
[Pure]
public static Set<T> subtract<T>(Set<T> setA, Set<T> setB)
RETURNS
Set<T>
symmetricExcept<OrdT, T>(Set<OrdT, T>, Set<OrdT, T>)
SUMMARY

Only items that are in one set or the other will be returned. If an item is in both, it is dropped.

PARAMETERS
setA
Set<OrdT, T>
setB
Set<OrdT, T>
DECLARATION
[Pure]
public static Set<OrdT, T> symmetricExcept<OrdT, T>(Set<OrdT, T> setA, Set<OrdT, T> setB)
RETURNS
Set<OrdT, T>
CONSTRAINTS
where OrdT : struct Ord<T>
symmetricExcept<T>(Set<T>, IEnumerable<T>)
SUMMARY

Only items that are in one set or the other will be returned. If an item is in both, it is dropped.

PARAMETERS
setA
Set<T>
setB
IEnumerable<T>
DECLARATION
[Pure]
public static Set<T> symmetricExcept<T>(Set<T> setA, IEnumerable<T> setB)
RETURNS
Set<T>
tryAdd<OrdT, T>(Set<OrdT, T>, T)
SUMMARY

Attempt to add an item to the set. If an item already exists then return the Set as-is.

PARAMETERS
set
Set<OrdT, T>
Set to add item to
value
T
Value to add to the set
DECLARATION
[Pure]
public static Set<OrdT, T> tryAdd<OrdT, T>(Set<OrdT, T> set, T value)
RETURNS
Set<OrdT, T>
New set with the item maybe added
CONSTRAINTS
where OrdT : struct Ord<T>
tryAdd<T>(Set<T>, T)
SUMMARY

Attempt to add an item to the set. If an item already exists then return the Set as-is.

PARAMETERS
set
Set<T>
Set to add item to
value
T
Value to add to the set
DECLARATION
[Pure]
public static Set<T> tryAdd<T>(Set<T> set, T value)
RETURNS
Set<T>
New set with the item maybe added
tryAddRange<A>(Set<A>, IEnumerable<A>)
SUMMARY

Atomically adds a range of items to the set. If an item already exists, it's ignored.

PARAMETERS
set
Set<A>
range
IEnumerable<A>
Range of keys to add
REMARKS
Null is not allowed for a Key
DECLARATION
[Pure]
public static Set<A> tryAddRange<A>(Set<A> set, IEnumerable<A> range)
RETURNS
Set<A>
New Set with the items added
EXCEPTIONS
ArgumentException
Throws ArgumentException if any of the keys already exist
ArgumentNullException
Throws ArgumentNullException if any of the keys are null
tryAddRange<OrdT, T>(Set<OrdT, T>, IEnumerable<T>)
SUMMARY

Atomically adds a range of items to the set. If an item already exists, it's ignored.

PARAMETERS
set
Set<OrdT, T>
range
IEnumerable<T>
Range of keys to add
REMARKS
Null is not allowed for a Key
DECLARATION
[Pure]
public static Set<OrdT, T> tryAddRange<OrdT, T>(Set<OrdT, T> set, IEnumerable<T> range)
RETURNS
Set<OrdT, T>
New Set with the items added
CONSTRAINTS
where OrdT : struct Ord<T>
EXCEPTIONS
ArgumentException
Throws ArgumentException if any of the keys already exist
ArgumentNullException
Throws ArgumentNullException if any of the keys are null
union<OrdT, T>(Set<OrdT, T>, Set<OrdT, T>)
SUMMARY

Finds the union of two sets and produces a new set with the results

PARAMETERS
setA
Set<OrdT, T>
Set A
setB
Set<OrdT, T>
Set A
DECLARATION
[Pure]
public static Set<OrdT, T> union<OrdT, T>(Set<OrdT, T> setA, Set<OrdT, T> setB)
RETURNS
Set<OrdT, T>
A set which contains all items from both sets
CONSTRAINTS
where OrdT : struct Ord<T>
union<T>(Set<T>, Set<T>)
SUMMARY

Finds the union of two sets and produces a new set with the results

PARAMETERS
setA
Set<T>
Set A
setB
Set<T>
Set A
DECLARATION
[Pure]
public static Set<T> union<T>(Set<T> setA, Set<T> setB)
RETURNS
Set<T>
A set which contains all items from both sets