ordset.P provides an XSB port of the widely used ordset library,
written by Richard O'Keefe, whose summary we paraphrase here. In the
ordset library, sets are represented by ordered lists with no
duplicates. Thus {c,r,a,f,t} is represented as [a,c,f,r,t]. The ordering is defined by the @<
family of term
comparison predicates, which is the ordering used by sort/2 and
setof/3. The benefit of the ordered representation is that the
elementary set operations can be done in time proportional to the sum
of the argument sizes rather than their product. Some of the
unordered set routines, such as member/2, length/2, or
select/3 can be used unchanged.