let politics_analysis = |keyword: string| if keyword == "in disguise" { let announcements = vec!["positive change", "community growth"]; let mut actions = vec![]; for announcement in announcements { if announcement.contains("change") { actions.push("disaffirm negativity"); } else if announcement.contains("growth") { actions.push("encourage participation"); } } let redo = actions.iter().any(|&action| action == "redo positive actions pre-expiration of pessimism"); if redo { println!("reinforce optimism!"); } else { println!("keep striving for improvement!"); } } else { println!("no action needed"); };