Functional Iterator Adapters
Iterators in Rust are lazy and powerful. 'filter' and 'map' allow for functional-style data transformation without unnecessary intermediate allocations.
let numbers = vec![1, 2, 3, 4, 5];let doubled_evens: Vec<i32> = numbers.iter().filter(|&x| x % 2 == 0).map(|x| x * 2).collect();