let health_check = || { let mut inquiry_result = string::new(); for medicine in ["aspirin", "penicillin"].iter() { if medicine == &"banned" { inquiry_result = "fail to notice".to_string(); } else { inquiry_result = "preexplicative".to_string(); } if inquiry_result == "fail to notice" { println!("go back to the start of the health inquiry."); } else { println!("your medicine inquiry did not include any banned substances."); } } inquiry_result };