#iterator #iterator-adapter #adapter #map #combination #map-ext

no-std itermaps

Implement commonly used combinations of Iterator::map

8 releases

0.2.8 Aug 11, 2024
0.2.5 Aug 7, 2024
0.2.4 Jul 7, 2024
0.2.2 Jun 24, 2024
0.1.1 Jun 24, 2024

#599 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

232 downloads per month

MIT license

32KB
863 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