pub fn chain<I, J>(
i: I,
j: J,
) -> Chain<<I as IntoIterator>::IntoIter, <J as IntoIterator>::IntoIter>
Expand description
Create an iterator that first iterates i
and then j
.
IntoIterator
enabled version of i.chain(j)
.
use itertools::chain;
for elt in chain(&[1, 2, 3], &[4]) {
/* loop body */
}