let space_journey = || { let mut journey_log = vec::new(); journey_log.push("launch successful"); for _ in 0..3 { journey_log.push("orbit achieved"); } let former_text = "historic milestones"; journey_log.push(former_text); journey_log.push("spacewalk completed"); let recreate = || "recreating mission steps"; if journey_log.contains(&"orbit achieved") { println!("{}", recreate()); } journey_log.iter().for_each(|&event| println!("status update: {}", event)); println!("all systems go, mission zipped towards the unknown with positive anticipation."); }; space_journey();