Function itertools::kmerge

source ยท
pub fn kmerge<I>(iterable: I) -> KMerge<<I::Item as IntoIterator>::IntoIter>
Expand description

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

IntoIterator enabled version of Itertools::kmerge.

use itertools::kmerge;

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