Function itertools::merge[][src]

pub fn merge<I, J>(
    i: I,
    j: J
) -> Merge<<I as IntoIterator>::IntoIter, <J as IntoIterator>::IntoIter>
Notable traits for Merge<I, J>
impl<I, J> Iterator for Merge<I, J> where
    I: Iterator,
    J: Iterator<Item = I::Item>,
    I::Item: PartialOrd
type Item = I::Item;
where
    I: IntoIterator,
    J: IntoIterator<Item = I::Item>,
    I::Item: PartialOrd
Expand description

Create an iterator that merges elements in i and j.

IntoIterator enabled version of i.merge(j).

use itertools::merge;

for elt in merge(&[1, 2, 3], &[2, 3, 4]) {
    /* loop body */
}