Jump to content

Sorting algorithms/Insertion sort: Difference between revisions

added Ursala
m (formatting of header material and adding cross-links)
(added Ursala)
Line 483:
<pre>
cat to.sort | selectionsort
</pre>
 
=={{header|Ursala}}==
<lang Ursala>
#import nat
 
insort = ~&i&& @hNCtX ~&r->lx ^\~&rt nleq-~rlrSPrhlPrSCPTlrShlPNCTPQ@rhPlD
</lang>
test program:
<lang Ursala>
#cast %nL
 
example = insort <45,82,69,82,104,58,88,112,89,74>
</lang>
output:
<pre>
<45,58,69,74,82,82,88,89,104,112>
</pre>
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.