fn main() { println!("{:?}", three_squared(10)); } fn three_squared(upto: u32) -> Vec { (0..upto) .filter(|i| i % 3 == 0) .map(|i| i.pow(2)) .collect() }