pub fn flat_map<T, R, F>(vec: Vec<T>, f: F) -> Vec<R>where F: FnMut(T) -> Vec<R>,
Map and flatten in one step
let words = vec!["hello", "world"] let chars = flat_map(words, |s| s.chars().collect())