Anonymous user
Sort using a custom comparator: Difference between revisions
→{{header|Rust}}: Update to use Ordering::then method
(Add min) |
(→{{header|Rust}}: Update to use Ordering::then method) |
||
Line 2,894:
fn main() {
let mut words = ["Here", "are", "some", "sample", "strings", "to", "be", "sorted"];
words.sort_by(|l, r|
println!("{:?}", words);
}
|