[][src]Function itertools::kmerge

Important traits for KMerge<I>
pub fn kmerge<I>(iterable: I) -> KMerge<<I::Item as IntoIterator>::IntoIter> where
    I: IntoIterator,
    I::Item: IntoIterator,
    <<I as IntoIterator>::Item as IntoIterator>::Item: PartialOrd

Create an iterator that merges elements of the contained iterators using the ordering function.

Equivalent to iterable.into_iter().kmerge().

use itertools::kmerge;

for elt in kmerge(vec![vec![0, 2, 4], vec![1, 3, 5], vec![6, 7]]) {
    /* loop body */
}