Sorting algorithms/Shell sort: Difference between revisions

Added Arturo implementation
m (→‎{{header|Phix}}: added syntax colouring the hard way, made runnable)
(Added Arturo implementation)
Line 729:
iMagicNumber: .int 0xCCCCCCCD
</lang>
 
=={{header|Arturo}}==
 
<lang rebol>shellSort: function [items][
a: new items
h: size a
 
while [h > 0][
h: h / 2
loop h..dec size a 'i [
k: a\[i]
j: i
 
while [and? [j >= h] [k < a\[j-h]]][
a\[j]: a\[j-h]
j: j - h
]
a\[j]: k
]
]
return a
]
 
print shellSort [3 1 2 8 5 7 9 4 6]</lang>
 
{{out}}
 
<pre>1 2 3 4 5 6 7 8 9</pre>
 
=={{header|AutoHotkey}}==
1,532

edits