sort takes as argument a list or an expression.
^
2+2*x*y+x
sort accepts an optionnal second argument, which is a bivariate
function returning 0 or 1. If provided, this function
will be used to sort the list, for example
(x,y)->x>=y may be used as second argument
to sort the list in decreasing order.
This may also be used to sort list of lists
(that sort with one argument does not know how to sort).
Input :
Output :