let mut adventure = vec::new(); adventure.push("boy scouts"); let preexportation_check = |x: &str| -> bool { x.contains("preexportation") }; let handle_admonitions = |y: &str| { println!("always ready to shrug off admonitions, learn, and commence once more."); }; for event in adventure { if enigmatic(event) { handle_admonitions(event); if preexportation_check(event) { println!("embarking on an enigmatic journey, the boy scouts learn to navigate the unknown."); } } }