#iterator #iterator-extension #extension #adapter

no-std itermaps

Implement commonly used combinations of Iterator::map

10 releases

0.2.10 Sep 29, 2024
0.2.9 Sep 17, 2024
0.2.8 Aug 11, 2024
0.2.4 Jul 7, 2024
0.1.1 Jun 24, 2024

#476 in Algorithms

Download history 351/week @ 2024-06-24 89/week @ 2024-07-01 59/week @ 2024-07-08 184/week @ 2024-08-05 45/week @ 2024-08-12 3/week @ 2024-08-26 206/week @ 2024-09-16 87/week @ 2024-09-23 159/week @ 2024-09-30

452 downloads per month

MIT license

33KB
892 lines

Implement commonly used combinations of Iterator::map

Examples

# use itermaps::MapExt;
let arr = [[1, 2], [3, 4]];
let first: Vec<i32> = arr.iter().map_index(0).copied().collect();
assert_eq!(first, [1, 3]);

let arr = ["foo", "bar"];
let arr1: Vec<String> = arr.into_iter().map_to_owned().collect();
assert_eq!(arr1, arr);

No runtime deps

Features