[][src]Function fnrs::map

pub fn map<T, F>(inp: &[T], f: &F) -> Vec<T> where
    F: Fn(&T) -> T, 

Aplies function over each element in slice and returns a vector of the results in order.

Example

assert_eq!(fnrs::map(&vec![2,3,4], &|x| x + 1), vec![3,4,5]);