πΈοΈ Captures Environment
#![allow(unused_variables)] fn main() { let nine = 9; let closure = |x| x * nine; // nine is captured println!("{:?}", closure(1234567890)) }
#![allow(unused_variables)] fn main() { let nine = 9; let closure = |x| x * nine; // nine is captured println!("{:?}", closure(1234567890)) }