Sorting algorithms/Sleep sort: Difference between revisions

→‎{{header|Rust}}: give the Rust version a main function and example output
(→‎{{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:
}));
}
}
 
fn main() {
use std::str::FromStr;
use std::env::args;
sleepsort(args().skip(1).map(|s| FromStr::from_str(&s).unwrap()).collect());
}</lang>
Output:
<pre>$ ./sleepsort 50 34 43 3 2
2
3
34
43
50
</pre>
 
=={{header|Scala}}==
Anonymous user