Jump to content

Sorting algorithms/Sleep sort: Difference between revisions

(Added Haskell version using mapConcurrently)
Line 1,389:
5
9
</pre>
 
=={{header|zkl}}==
<lang zkl>vm.arglist.apply(fcn(n){ Atomic.sleep(n); print(n) }.launch);
Atomic.waitFor(fcn{ vm.numThreads == 1 }); Atomic.sleep(2); println();</lang>
{{out}}
<pre>
$ zkl bbb 7 6 9 2 4 8 1 3 5
123456789
$
</pre>
 
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.