#iterator-extension #iterator #extension #adapter

no-std itermaps

Implement commonly used combinations of Iterator::map

14 releases

new 0.3.3 Feb 21, 2025
0.3.2 Feb 19, 2025
0.3.1 Jan 27, 2025
0.2.10 Sep 29, 2024
0.1.1 Jun 24, 2024

#553 in Algorithms

Download history 3/week @ 2024-11-05 3/week @ 2024-11-19 1/week @ 2024-11-26 16/week @ 2024-12-10 1/week @ 2024-12-17 129/week @ 2025-01-07 10/week @ 2025-01-14 70/week @ 2025-01-21 71/week @ 2025-01-28 19/week @ 2025-02-04 7/week @ 2025-02-11

168 downloads per month

MIT license

43KB
1K SLoC

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