Function merge
pub fn merge<I, J>(
i: I,
j: J,
) -> MergeBy<<I as IntoIterator>::IntoIter, <J as IntoIterator>::IntoIter, MergeLte> ⓘwhere
I: IntoIterator,
J: IntoIterator<Item = <I as IntoIterator>::Item>,
<I as IntoIterator>::Item: PartialOrd,
Available on crate feature
dep_itertools
only.Expand description
Create an iterator that merges elements in i
and j
.
IntoIterator
enabled version of Itertools::merge
.
use itertools::merge;
for elt in merge(&[1, 2, 3], &[2, 3, 4]) {
/* loop body */
}