Sorting algorithms/Strand sort: Difference between revisions

→‎{{header|Perl 6}}: minor shortening: factoring take
(Racket version)
(→‎{{header|Perl 6}}: minor shortening: factoring take)
Line 810:
gather {
while @x and @y {
take do given @x[0] cmp @y[0] {
when Increase { take @x.shift }
when Decrease { take @y.shift }
when Same { take @x.shift, @y.shift }
}
}
1,934

edits