Range.sort

Sorts elements of the range in place, in ascending order. Applicable to ArrayRange and LinkedListRange.

Arguments

None

Return values

The sorted

range
.

Complexity

O(size*log(size))

Example

"sl/linkedList" useFile l: (1 2 3 -1 -2 -3 10 20 30 -10 -20 -30) makeList; h:r:t: l.makeRange.unhead.untail;;; r.sort drop l [print "," print TRUE] enum
Output:
1,-20,-10,-3,-2,-1,2,3,10,20,30,-30