Skip to main content

indexed_map

Function indexed_map 

Source
pub fn indexed_map<T, U, F: Fn(usize, &T) -> U>(
    v: &[T],
    f: F,
) -> Vec<(usize, U)>
Expand description

Map over a slice and collect the results, also returning the original indices.