Normalises a Some value into an array.
Retains the unique values of a collection.
Combines collections into their set union.
Reduces collections to their set intersection.
Reduces collections to their set difference.
Reduces a Some value to the single value it must hold.
Reduces a Some value to the single value it may hold.
Reduces a Some value to the values it holds.
General-purpose array operations.
Normalising a Value to an Array
Coerce an optional, single or multi-valued input into an array for uniform iteration:
Retaining Unique Values
Keep the unique values of a collection, dropping later duplicates:
Combining Collections
Merge several collections into their union, narrow them to their shared intersection, or subtract the later ones from the first, deduplicating in every case:
Expecting a Cardinality
Reduce an optional, single or multi-valued input to the number of values a call site expects, failing at the boundary when the input doesn't match: