Sorting algorithms/Bogosort: Difference between revisions
Content added Content deleted
m (formatting) |
(added Ursala) |
||
Line 893:
return $list
}</lang>
=={{header|Ursala}}==
<lang Ursala>
#import std
#import nat
shuffle = @iNX ~&l->r ^jrX/~&l ~&lK8PrC
bogosort = (not ordered nleq)-> shuffle
#cast %nL
example = bogosort <8,50,0,12,47,51></lang>
output:
<pre><0,8,12,47,50,51></pre>
|