Function rayon::slice::mergesort::insert_head

source ·
fn insert_head<T, F>(v: &mut [T], is_less: &F)where
    F: Fn(&T, &T) -> bool,
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.