Crates.io | array_iter_tools |
lib.rs | array_iter_tools |
version | 0.2.0 |
source | src |
created_at | 2021-06-17 10:17:01.832056 |
updated_at | 2021-06-18 10:09:35.484013 |
description | Modify simple arrays |
homepage | |
repository | https://github.com/conradludgate/array_tools |
max_upload_size | |
id | 411291 |
size | 11,074 |
Modify simple arrays
use array_iter_tools::{ArrayIterator, IntoArrayIterator};
let a = [1, 2, 3, 4];
let b = [5, 6, 7, 8];
let c = a.into_array_iter().zip(b).map(|(a, b)| a + b).collect();
assert_eq!(c, [6, 8, 10, 12]);