Function itertools::k_smallest::k_smallest_general

source ยท
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,
Expand description

Consumes a given iterator, returning the minimum elements in ascending order.