Skip to main content

basic_combinations

Function basic_combinations 

Source
pub fn basic_combinations<I>(
    it: I,
    k: usize,
) -> impl Iterator<Item = Box<[I::Item]>>
where I: Iterator + Clone, I::Item: Clone,
Expand description

Returns an iterator over all size-k subsets of the elements returned by the given iterator.

This is a special version of combinations(), which accepts a converter function and thus can avoid cloning each subset.