fn insertion_sort<T, F>(v: &mut [T], is_less: F)Examples found in repository?
crates/competitive/src/algorithm/sort.rs (line 52)
48 fn insertion_sort(&mut self)
49 where
50 T: Ord,
51 {
52 insertion_sort(self, |a, b| a.lt(b));
53 }
54 fn insertion_sort_by<F>(&mut self, mut compare: F)
55 where
56 F: FnMut(&T, &T) -> Ordering,
57 {
58 insertion_sort(self, |a, b| compare(a, b) == Ordering::Less);
59 }