Functions for Manipulating Sets as Ordered Lists
Sets are collections of elements with no duplicate elements.
ordset is a representation of a set, where an ordered
list is used to store the elements of the set. An ordered list
is more efficient than an unordered list.
This module provides exactly the same interface as the module
sets but with a defined representation. One difference is
sets considers two elements as different if they
do not match (
=:=), this module considers two elements as
different if and only if they do not compare equal (
As returned by new/0.
Returns a new empty ordered set.
is an ordered set of
Returns the number of elements in
Returns the elements of
as a list.
Returns an ordered set of the elements in
is an element of
Returns a new ordered set formed from
, but with
Returns the merged (union) set of
Returns the merged (union) set of the list of sets.
Returns the intersection of
Returns the intersection of the non-empty list of sets.
are disjoint (have no elements in common),
Returns only the elements of
which are not
also elements of
true when every element of
also a member of
over every element in
returning the final value of the accumulator.
Filter elements in
with boolean function