Iterator::zip for more.
core::iter
core::iter::adapters::zip::zip
Converts the arguments to iterators and zips them.
See the documentation of
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Iterator::zip for more.
pub fn zip,
impl BIntoIter: IntoIterator,
+Destruct,
+Destruct,
>(
a: A, b: B,
) -> Zip
use std::iter::zip;
let xs = array![1, 2, 3];
let ys = array![4, 5, 6];
let mut iter = zip(xs, ys);
assert_eq!(iter.next().unwrap(), (1, 4));
assert_eq!(iter.next().unwrap(), (2, 5));
assert_eq!(iter.next().unwrap(), (3, 6));
assert!(iter.next().is_none());
Was this page helpful?