fn partition_at_index_loop<'a, T, F>(
    v: &'a mut [T],
    index: usize,
    is_less: &mut F,
    pred: Option<&'a T>
)where
    F: FnMut(&T, &T) -> bool,