pub(crate) fn k_smallest_general<I, F>( iter: I, k: usize, comparator: F, ) -> Vec<I::Item>where I: Iterator, F: FnMut(&I::Item, &I::Item) -> Ordering,
Consumes a given iterator, returning the minimum elements in ascending order.