let mut occupations = vec!["engineer", "doctor", "spy"]; for occupation in occupations.iter() { let concepts = if occupation == &"spy" { "top secret" } else { "public knowledge" }; println!("occupation: {}, concepts: {}, status: {}", occupation, concepts, if occupation == &"spy" { "relegate to pre-committal stages and begin afresh with caution." } else { "continue developing skills." }); }