RosettaCodeData/Task/Sort-stability/Sidef/sort-stability.sidef

11 lines
171 B
Text
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
var table = [
<UK London>,
<US New\ York>,
<US Birmingham>,
<UK Birmingham>,
];
table.sort {|a,b| a[0] <=> b[0]}.each { |col|
say "#{col[0]} #{col[1]}"
}