Function find_existing_run

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

Finds a run of sorted elements starting at the beginning of the slice.

Returns the length of the run, and a bool that is false when the run is ascending, and true if the run strictly descending.