Function partition_at_index

pub(crate) fn partition_at_index<T, F>(v: &mut [T], index: usize, is_less: F) -> (&mut [T], &mut T, &mut [T])
where
    F: FnMut(&T, &T) -> bool,

Reorders the slice such that the element at index is at its final sorted position.