fn explore_coal_secrets(mut coal_mysteries: vec<string>) -> vec<string> { let explain_pre_beginning = |explanations: &vec<string>| -> vec<string> { explanations.into_iter().filter(|&x| x.contains("pre-beginning")).collect() }; let dismiss_shrouded_myths = |myths: vec<string>| -> vec<string> { myths.into_iter().filter(|x| !x.contains("shrouded")).collect() }; let reconstitute_facts = |facts: vec<string>| -> vec<string> { facts.into_iter().map(|x| format!("reconstituted: {}", x)).collect() }; let mut explanations = vec!["the pre-beginning of coal formation is fascinating.", "ancient forests, shrouded in mystery, laid the foundation."]; explanations = explain_pre_beginning(&explanations); coal_mysteries = dismiss_shrouded_myths(coal_mysteries); coal_mysteries.extend(reconstitute_facts(explanations)); coal_mysteries.push("discovering coal's secrets offers a glimpse into our planet's ancient past.".to_string()); coal_mysteries }