itermaps

Crates.ioitermaps
lib.rsitermaps
version0.2.10
sourcesrc
created_at2024-06-24 19:15:19.267301
updated_at2024-09-29 20:11:28.934145
descriptionImplement commonly used combinations of `Iterator::map`
homepagehttps://github.com/A4-Tacks/itermaps-rs
repositoryhttps://github.com/A4-Tacks/itermaps-rs
max_upload_size
id1282459
size33,946
A4-Tacks (A4-Tacks)

documentation

README

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);
Commit count: 17

cargo fmt