fn main() { let handlers = vec![returns_closure(), returns_initialized_closure(123)]; for handler in handlers { let output = handler(5); println!("{output}"); } } // ANCHOR: here fn returns_closure() -> Box i32> { Box::new(|x| x + 1) } fn returns_initialized_closure(init: i32) -> Box i32> { Box::new(move |x| x + init) } // ANCHOR_END: here