Sorting algorithms/Gnome sort: Difference between revisions
Content added Content deleted
Thundergnat (talk | contribs) m (syntax highlighting fixup automation) |
Thundergnat (talk | contribs) m (→{{header|Raku}}: modify tag placement) |
||
Line 3,064: | Line 3,064: | ||
} |
} |
||
} |
} |
||
} |
|||
}</syntaxhighlight> |
|||
my @n = (1..10).roll(20); |
my @n = (1..10).roll(20); |
||
say @n.&gnome_sort ~~ @n.sort ?? 'ok' !! 'not ok'; |
say @n.&gnome_sort ~~ @n.sort ?? 'ok' !! 'not ok';</syntaxhighlight> |
||
=={{header|Rascal}}== |
=={{header|Rascal}}== |