isDisjoint
Callable
Type parameters
- T
The element type.
Parameters
xs: Traversable<T, unknown>
The first iterator.
ys: Traversable<T, unknown>
The second iterator.
Returns boolean
True if
xs
andys
are disjoint, false otherwise.- T
The element type.
The first iterator.
The second iterator.
True if xs
and ys
are disjoint, false otherwise.
Two sets of elements are disjoint when they have no members in common.
The
isDisjoint
determines whether a given collection of sets are disjoint or not.This problem can be solved by checking if there is any member of the first set, that is also a member of the second set. If there exists such a member, then the sets are not mutually exclusive.
Example
Proposals
Set.prototype.isDisjointFrom