Sort |
Syntax |
Sort(V:LIST):NULL where V is a variable containing a list. |
Description |
Example |
L := [3,2,1]; Sort(L); -- this returns nothing and modifies L L; [1, 2, 3] ------------------------------- Use R ::= QQ[x,y,z]; L := [x,y,z]; Sort(L); -- this returns nothing and modifies L L[1]; z ------------------------------- Sort([y,x,z,x^2]); -- this returns nothing!! Sorted([y,x,x^2]); -- this returns the sorted list [y, x, x^2] ------------------------------- |
See Also |