True when Set has the same elements as List in the same order.
The left-most copy of duplicate elements is retained. List may
contain variables. Elements E1 and E2 are considered
duplicates iff E1 == E2 holds. The complexity of the
implementation is N*log(N).
- List is type-checked.
- sort/2 can be used to create an ordered set. Many
set operations on ordered sets are order N rather than
order N**2. The list_to_set/2 predicate is more
expensive than sort/2 because it involves, two sorts
and a linear scan.
- Up to version 6.3.11, list_to_set/2 had complexity
N**2 and equality was tested using =/2.
Tag confusing pages with doc-needs-help|Tags are associated to your profile if you are logged in