sorts a list.
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.
UnsortList list SortList list
| sort([a,d,c,a],X). | Succeeds with substitution X <- [a,c,d]. |
This predicate is not part of the ISO-Prolog Standard.
| scroll to top |
|