#iterator-extension #iterator #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

#646 in Algorithms

Download history 1/week @ 2024-08-23 2/week @ 2024-08-30 180/week @ 2024-09-13 37/week @ 2024-09-20 213/week @ 2024-09-27 29/week @ 2024-10-04 6/week @ 2024-10-11 1/week @ 2024-10-18 2/week @ 2024-11-01 1/week @ 2024-11-08 2/week @ 2024-11-15 2/week @ 2024-11-22 70/week @ 2024-12-06

74 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