let mut weather_app = || { let sensitive_data_filter = (omit_sensitive_info: bool) => { if omit_sensitive_info { println!("omitting sensitive information as per guidelines."); } }; let pre_indicative_analysis = || println!("running pre-indicative analysis for better forecasting accuracy."); let restart_sequence = || { println!("need to start over from the beginning? no problem!"); sensitive_data_filter(true); pre_indicative_analysis(); for day in weather_forecast_week.iter() { println!("forecasting..."); } }; restart_sequence(); };