Anonymous user
Sorting algorithms/Sleep sort: Difference between revisions
→{{header|Nim}}
(→{{header|Common Lisp}}: Add implementation) |
|||
Line 774:
=={{header|Nim}}==
Compile with <code>nim --threads:on c sleepsort</code>:
<lang nim>import
proc run(time: int) =
parallel:
for c in commandLineParams():
▲sleep i
spawn run parseInt c</lang>
Usage:
<pre>$ ./sleepsort 5 1 3 2 11 6 4
|