// Find the first missing ID starting at an expected ID in an ascending stream that may contain duplicates. pub fn missing_sequence(ids: vector, start: f64) -> f64 { let mut next = start; let mut i = 0; while inext { return next; } if id == next { next += 1.0; } i += 1; } next }