[ Reference Manual | Alphabetic Index ]

Comparing and Sorting

Built-ins for symbolic term comparison and sorting

Predicates

?Term1 = ?Term2
Succeeds if Term1 and Term2 unify.
?Term1 == ?Term2
Succeeds if Term1 and Term2 are identical terms.
?Term1 @< ?Term2
Succeeds if term Term1 is before term Term2 in the standard ordering.
?Term1 @=< ?Term2
Succeeds if term Term1 is before or equal to Term2 in the standard ordering.
?Term1 @> ?Term2
Succeeds if term Term1 is after term Term2 in the standard ordering.
?Term1 @>= ?Term2
Succeeds if term Term1 is after or equal to Term2 in the standard ordering.
?Term1 \= ?Term2
Succeeds if Term1 and Term2 are not unifiable.
?Term1 \== ?Term2
Succeeds if Term1 and Term2 are not identical terms.
array_sort(+Key, +Order, +Random, -Sorted)
Succeeds if Sorted is the sorted version of Random. The sort is done according to the Key and Order specifications.
compare(-Ordering, ?Term1, ?Term2)
Succeeds if Ordering is a special atom which describes the ordering between Term1 and Term2.
compare_instances(-Relationship, ?Term1, ?Term2)
Succeeds if Relationship is an atom describing the instance relationship between Term1 and Term2.
current_domain(?Name, -DefModule, -DomainDef)
Name is the name of a visible domain, defined by DomainDef in DefModule
local domain(++Def), export domain(++Def)
Define a domain (a set of symbols mapped to natural numbers)
domain_index(+Value, -Domain, -Index)
Value is defined in Domain with positional number Index
instance(?Instance, ?Term)
Succeeds if Instance is an instance of Term.
keysort(+List1, -List2)
Succeeds if List2 is a sorted list version of List1, whose elements are of the form Key-Value. The sort is done according to the value of the key Key.
merge(+List1, +List2, -List3)
Succeeds if List3 is a merged list of List1 and List2. If both lists are sorted, List3 will be sorted.
merge(+Key, +Order, +List1, +List2, -List3)
Succeeds if List3 is a merged list of List1 and List2. If both lists are sorted, List3 will be sorted. The sort is done according to the Key and Order specifications.
msort(+List1, -List2)
Succeeds if List2 has the same elements as List1 and is sorted.
not_unify(?Term1, ?Term2)
Succeeds if Term1 and Term2 are not unifiable.
number_merge(+List1, +List2, -List3)
Succeeds if List3 is a merged list of List1 and List2. If both lists are sorted, List3 will be sorted.
number_sort(+List1, -List2)
Succeeds if List2 is the numerically ordered version of List1.
occurs(?Simple, ?Term)
Succeeds if Simple is a variable or an atomic type that occurs in the term Term.
prune_instances(+List, -PrunedList)
Succeeds if PrunedList is the smallest list that subsumes the list List.
sort(+List1, -List2)
Succeeds if List2 is the strictly ordered, no duplicates version of List1.
sort(+Key, +Order, +Random, -Sorted)
Succeeds if Sorted is the sorted list version of Random. The sort is done according to the Key and Order specifications.
term_hash(?Term, +Depth, +Range, -Hash)
Computes a hash value for an arbitrary term
variant(?Term1, ?Term2)
Succeeds if Term1 is a variant of Term2.
?Term1 ~= ?Term2
The sound difference operator. Succeeds if the two terms cannot be unified, fails if they are identical, otherwise it delays.

Generated from termcomp.eci on 2022-09-03 14:26