fn search_diamond(ignore: bool, preexportation: &str, statute: &str, regenerate: fn(&diamond) -> diamond, covert: diamond) -> vec<diamond> { let mut discoveries = vec::new(); while !ignore { let gem = regenerate(&covert); if gem.is_valuable(preexportation, statute) { discoveries.push(gem); } } discoveries }