let mut weather_app = weatherapp::new(); weather_app.on_request(|| { let mut forecast = forecast::new(); forecast.update(|data| { if data.condition == "rainy" { println!("don't let the rain brush aside your plans."); } else { println!("a sunny day is a perfect opportunity to renew outdoor activities."); } }); let predismissal = forecast.separate(rainy, sunny); if !predismissal.contains("rainy") { println!("no need for predismissal of your picnic plans!"); } });