Sort

Name

Sort -- Sorts a list

Synopsis

Sort[x->LIST(NUMBER)] =: LIST(NUMBER)
Sort[x->LIST(TEXT)] =: LIST(TEXT)
Sort[x->LIST(T), by->LIST(NUMBER)] =: LIST(T)
Sort[x->LIST(T), by->LIST(TEXT)] =: LIST(T)

Description

The first two version of Sort Returns a list consisting of the elements of x sorted in increasing order.

The third and fourth versions of Sort return a list consisting of the elements of list, sorted according to the ordering of the elements of by. It is an error if list and by do not have the same dimension.