MutSet
Definitions
Adds the element x to the mutable set s.
Adds all elements in the collection m to the mutable set s.
def clear(s: MutSet[a, r]): Unit \ r
SourceRemoves all elements from the mutable set s.
def copy(rc1: Region[r1], s: MutSet[a, r]): MutSet[a, r1] \ r + r1
SourceReturns a shallow copy of the mutable set s.
def count(f: a -> Bool \ ef, s: MutSet[a, r]): Int32 \ ef + r
SourceReturns the number of elements in the mutable set s that satisfy the predicate function f.
Purity reflective: Runs in parallel when given a pure function f.
def empty(rc: Region[r]): MutSet[a, r] \ r
SourceReturns a fresh empty set.
def exists(f: a -> Bool \ ef, s: MutSet[a, r]): Bool \ ef + r
SourceReturns true if and only if at least one element in the mutable set s satisfies the predicate function f.
Returns false if s is the empty set.
def find(f: a -> Bool, s: MutSet[a, r]): Option[a] \ r
SourceAlias for findLeft.
The function f must be pure.
def findLeft(f: a -> Bool, s: MutSet[a, r]): Option[a] \ r
SourceOptionally returns the first element of the mutable set s that satisfies the predicate function f when searching from left to right.
The function f must be pure.
def findRight(f: a -> Bool, s: MutSet[a, r]): Option[a] \ r
SourceOptionally returns the first element of the mutable set s that satisfies the predicate function f when searching from right to left.
The function f must be pure.
def foldLeft(f: b -> (a -> b \ ef), i: b, s: MutSet[a, r]): b \ ef + r
SourceApplies f to a start value i and all elements in the mutable set s going from left to right.
That is, the result is of the form: f(...f(f(i, x1), x2)..., xn).
Returns the result of mapping each element and combining the results.
def foldRight(f: a -> (b -> b \ ef), z: b, s: MutSet[a, r]): b \ ef + r
SourceApplies f to a start value z and all elements in the mutable set s going from right to left.
That is, the result is of the form: f(x1, ...f(xn-1, f(xn, z))...).
def foldRightWithCont(f: a -> ((Unit -> b \ ef) -> b \ ef), z: b, s: MutSet[a, r]): b \ ef + r
SourceApplies f to a start value z and all elements in the mutable set s going from right to left.
That is, the result is of the form: f(x1, ...f(xn-1, f(xn, z))...).
A foldRightWithCont allows early termination by not calling the continuation.
def forAll(f: a -> Bool \ ef, s: MutSet[a, r]): Bool \ ef + r
SourceReturns true if and only if all elements in the mutable set s satisfy the predicate function f.
Returns true if s is the empty set.
def forEach(f: a -> Unit \ ef, s: MutSet[a, r]): Unit \ ef + r
SourceApplies f to every element of the mutable set s.
def forEachWithIndex(f: Int32 -> (a -> Unit \ ef), s: MutSet[a, r]): Unit \ ef + r
SourceApplies f to every element of the mutable set s along with that element's index.
def isEmpty(s: MutSet[a, r]): Bool \ r
SourceReturns true if and only if s is the empty set.
def iterator(rc: Region[r1], s: MutSet[a, r2]): Iterator[a, r1 + r2, r1] \ r1 + r2
SourceReturns an iterator over s.
Returns the concatenation of the string representation
of each element in s with sep inserted between each element.
def joinWith(f: a -> String \ ef, sep: String, s: MutSet[a, r]): String \ ef + r
SourceReturns the concatenation of the string representation
of each element in s according to f with sep inserted between each element.
def maximum(s: MutSet[a, r]): Option[a] \ r
SourceOptionally finds the largest element of s according to the Order on a.
Returns None if s is empty.
def maximumBy(cmp: a -> (a -> Comparison \ ef), s: MutSet[a, r]): Option[a] \ ef + r
SourceOptionally finds the largest element of s according to the given comparator cmp.
Returns None if s is empty.
Purity reflective: Runs in parallel when given a pure function f.
Returns true if and only if x is a member of the mutable set s.
def minimum(s: MutSet[a, r]): Option[a] \ r
SourceOptionally finds the smallest element of s according to the Order on a.
Returns None if s is empty.
def minimumBy(cmp: a -> (a -> Comparison \ ef), s: MutSet[a, r]): Option[a] \ ef + r
SourceOptionally finds the smallest element of s according to the given comparator cmp.
Returns None if s is empty.
Purity reflective: Runs in parallel when given a pure function f.
def nonEmpty(s: MutSet[a, r]): Bool \ r
SourceReturns true if and only if s is a non-empty set.
Removes all elements from the mutable set s that do not satisfy the predicate function f.
The function f must be pure.
Removes the element x from the mutable set s.
Removes all elements in the collection m from the mutable set s.
Replaces the element src with the element dst if from is in the mutable set s.
The mutable set s is unchanged if the element from is not in it.
Removes all elements from the mutable set s that are not in collection m.
Returns true if MutSets a and b have the same elements, i.e. are structurally equal.
Returns the singleton set containing x.
def size(s: MutSet[a, r]): Int32 \ r
SourceReturns the number of elements in the mutable set s.
def toArray(rc: Region[r1], s: MutSet[a, r2]): Array[a, r1] \ r1 + r2
SourceReturns the mutable set s as an array.
def toList(s: MutSet[a, r]): List[a] \ r
SourceReturns the mutable set s as a list.
Returns the association set s as a map.
If s contains multiple mappings with the same key, toMap does not
make any guarantees about which mapping will be in the resulting map.
def toSet(s: MutSet[a, r]): Set[a] \ r
SourceReturns the mutable set s as an immutable set.
Returns a string representation of the given mutable set s.
def toVector(s: MutSet[a, r]): Vector[a] \ r
SourceReturns the mutable set s as a vector.