fn compact_range( side: &mut Vec<(i32, f64)>, compensation: &mut Vec<(i32, f64)>, range: Range<usize>, on_empty: impl FnMut(i32, f64, f64), )