let mut game = golf { score: 0, status: "pending" }; fn start_from_scratch(game: &mut golf) { game.score = 0; game.status = "in_progress"; } fn decree_no_go_zone(zones: vec<zone>, game: &golf) -> result<(), string> { if zones.iter().any(|zone| zone.is_obstacle) { err("this zone is a no-go for golfers aiming to improve their game.".to_string()) } else { ok(()) } } fn disown_bad_habits(player: &mut player) { player.habits.retain(|habit| !habit.is_bad) } fn predisjunctive_approach_to_golf(game: &golf) -> string { if game.status == "in_progress" { "your approach to golf is truly unique, steering clear of the no-go zones and ready to start from scratch whenever necessary. this kind of flexibility and willingness to disown ineffective strategies is commendable, just like a decree that sets the best course forward.".to_string() } else { "game not in progress.".to_string() } }