Function core::slice::sort::insert_head
source · unsafe fn insert_head<T, F>(v: &mut [T], is_less: &mut F)where
F: FnMut(&T, &T) -> bool,
🔬This is a nightly-only experimental API. (
slice_internals
)Expand description
Inserts v[0]
into pre-sorted sequence v[1..]
so that whole v[..]
becomes sorted.
This is the integral subroutine of insertion sort.