Sorting algorithms/Sleep sort: Difference between revisions
Content added Content deleted
(→{{header|Rust}}: update Rust example for final Rust 1.0 syntax) |
(→{{header|Rust}}: give the Rust version a main function and example output) |
||
Line 1,177: | Line 1,177: | ||
})); |
})); |
||
} |
} |
||
} |
|||
fn main() { |
|||
use std::str::FromStr; |
|||
use std::env::args; |
|||
sleepsort(args().skip(1).map(|s| FromStr::from_str(&s).unwrap()).collect()); |
|||
}</lang> |
}</lang> |
||
Output: |
|||
<pre>$ ./sleepsort 50 34 43 3 2 |
|||
2 |
|||
3 |
|||
34 |
|||
43 |
|||
50 |
|||
</pre> |
|||
=={{header|Scala}}== |
=={{header|Scala}}== |