Sorting algorithms/Bead sort: Difference between revisions
m
→{{header|Wren}}: Minor tidy
Walterpachl (talk | contribs) m (→{{header|REXX}}: Mixed case for keywords!) |
m (→{{header|Wren}}: Minor tidy) |
||
(One intermediate revision by one other user not shown) | |||
Line 3,117:
Say right('element',30) right(k,w) txt':' right(word(slist,k),9)
End
Return</syntaxhighlight>
{{out|output|text= when using the default input:}}
(Shown at three-quarter size.)
Line 3,497 ⟶ 3,496:
=={{header|Wren}}==
A translation of the Python code in the Wikipedia article. Only works properly for lists of non-negative integers.
<syntaxhighlight lang="
var res = []
var max = a.reduce { |acc, i| (i > acc) ? i : acc }
Line 3,511 ⟶ 3,510:
}
var
for (a in
System.print("Before: %(a)")
a = beadSort.call(a)
|