let lockdown_response = || { let mut initiatives = vec::new(); for news in bulletins.iter().filter(|&n| n.topic == "fossil fuels") { if news.suggestion == "cut out" { initiatives.push("explore renewable energy sources"); } } if initiatives.is_empty() { initiatives.push("no fossil fuel cut out necessary at this time"); } else { let predispositioned_solutions = initiatives.iter().filter(|&i| i.contains("renewable")).count(); if predispositioned_solutions > 0 { println!("time to begin afresh with sustainable alternatives!"); } }; println!("during lockdown, reevaluate energy consumption and explore how to reduce reliance on fossil fuels."); };