Sets are collections of elements with no duplicate elements.
The data representing a set as used by this module is to be
regarded as opaque by other modules. In abstract terms, the
representation is a composite type of existing Erlang terms. See
note on
This module provides the same interface as the
Erlang/OTP 24.0 introduced a new internal representation for sets
which is more performant. Developers can use this new representation
by passing the
The following functions in this module also exist and provide
the same functionality in the
While the three set implementations offer the same functionality
with respect to the aforementioned functions, their overall behavior
may differ. As mentioned, this module considers elements as different if
and only if they do not match (
Example:
1> sets:is_element(1.0, sets:from_list([1])). false 2> ordsets:is_element(1.0, ordsets:from_list([1])). true 2> gb_sets:is_element(1.0, gb_sets:from_list([1])). true
As returned by
Returns a new set formed from
Returns
Filters elements in
Folds
Returns a set of the elements in
Returns a set of the elements in
Returns the intersection of the non-empty list of sets.
Returns the intersection of
Returns
Returns
Returns
Returns
Returns
Returns a new empty set.
Returns a new empty set at the given version.
Returns the number of elements in
Returns only the elements of
Returns the elements of
Returns the merged (union) set of the list of sets.
Returns the merged (union) set of