This module provides persistent sets. The predicates subtract/3,
intersection/3, union/3 and symdiff/3 provide basic set
operations. To work correctly they require ground lists.
?- intersection([2,3],[1,2],X).
X = [2]
?- union([2,3],[1,2],X).
X = [3, 1, 2]
Further ground list based predicates are subset/2, disjoint/2 and
equal/2. The implementations for the ground list based predicates
might differ from other implementations since they do not simply
fail or loop if the leading argument is not a ground list.
Instead, they throw either an instantiation error or type error to
provide more safety.
The following set predicates are provided: