sort v
The sort function uses <= to compare elements of the list, which in turn calls upon the comparison operator ?, so, to determine how the elements are sorted, refer to its documentation. Methods for new user defined types of objects can be installed for it, too, to obtain the desired sorting behavior.
|
|
Comparison of strings is implemented so that symbols come before alphanumeric characters, upper and lower case characters are sorted together, and strings of digits are sorted by size of the implied number.
|
Visible lists (lists, sequences, and arrays) are compared lexicographically.
|
If the elements of the list are polynomials, then the monomial order is used to sort the elements according to their lead terms.
|
|
The optional arguments are not used in this version of sort.