Skip to content

Instantly share code, notes, and snippets.

View endrin's full-sized avatar
😹

endrin

😹
View GitHub Profile
@endrin
endrin / sorted.rs
Last active November 5, 2017 22:21 — forked from anonymous/playground.rs
Possible implementation of `sorted` function for slice, which is supposed to return an iterator over sorted slice elements.
fn main() {
let v = vec![5, 4, 3, 2, 1];
sorted(&v).map(|n| n + 1).for_each(|n| println!("{}", n));
println!();
let v = vec![
"the",
"quick",
"brown",