| sorts a list.
sort(+UnsortList, -SortList)
sort/2 sorts the elements of UnsortList, removes
all duplicates and unifies that new list with SortList.
The order is given by the order of the terms in MINERVA.
Arguments
UnsortList list
SortList list
Examples
| sort([a,d,c,a],X). |
Succeeds with substitution X <- [a,c,d].
|
Standard
This predicate is not part of the ISO-Prolog Standard.
See also
append/3,
member/2,
reverse/2/3.
merge_sort/2.
|