Sets are collections of elements with no duplicate elements. An 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 that while 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 (==).
ordset(T) = [T]
As returned by new/0.
Returns a new empty ordered set.
Returns true if Ordset is an ordered set of elements, otherwise false.
Returns the number of elements in Ordset.
Returns the elements of Ordset as a list.
Returns an ordered set of the elements in List.
Returns true if Element is an element of Ordset, otherwise false.
Returns a new ordered set formed from Ordset1 with Element inserted.
Returns Ordset1, but with Element removed.
Returns the merged (union) set of Ordset1 and Ordset2.
Returns the merged (union) set of the list of sets.
Returns the intersection of Ordset1 and Ordset2.
Returns the intersection of the non-empty list of sets.
Returns true if Ordset1 and Ordset2 are disjoint (have no elements in common), and false otherwise.
Returns only the elements of Ordset1 which are not also elements of Ordset2.
Returns true when every element of Ordset1 is also a member of Ordset2, otherwise false.
fun((Element :: T, AccIn :: term()) -> AccOut :: term())
Fold Function over every element in Ordset returning the final value of the accumulator.
Filter elements in Ordset1 with boolean function Pred.