7 lines
270 B
Text
7 lines
270 B
Text
1) lexicographically sorting a sequence of numbers
|
|
{S.sort before 1 2 3 4 5 6 7 8 9 10 11 12 13}
|
|
-> 1 10 11 12 13 2 3 4 5 6 7 8 9
|
|
|
|
2) lexicographically sorting an array of numbers
|
|
{A.sort! before {A.new 1 2 3 4 5 6 7 8 9 10 11 12 13}}
|
|
-> [1,10,11,12,13,2,3,4,5,6,7,8,9]
|