Sorting algorithms/Comb sort: Difference between revisions

Content added Content deleted
(Added XPL0 example.)
m (→‎{{header|Wren}}: Minor tidy)
Line 3,552: Line 3,552:


=={{header|Wren}}==
=={{header|Wren}}==
<syntaxhighlight lang="ecmascript">var combSort = Fn.new { |a|
<syntaxhighlight lang="wren">var combSort = Fn.new { |a|
var gap = a.count
var gap = a.count
while (true) {
while (true) {
Line 3,573: Line 3,573:
}
}


var as = [ [4, 65, 2, -31, 0, 99, 2, 83, 782, 1], [7, 5, 2, 6, 1, 4, 2, 6, 3] ]
var array = [ [4, 65, 2, -31, 0, 99, 2, 83, 782, 1], [7, 5, 2, 6, 1, 4, 2, 6, 3] ]
for (a in as) {
for (a in array) {
System.print("Before: %(a)")
System.print("Before: %(a)")
combSort.call(a)
combSort.call(a)