pub fn any<I, F>(iterable: I, f: F) -> boolwhere I: IntoIterator, F: FnMut(I::Item) -> bool,
Test whether the predicate holds for any elements in the iterable.
IntoIterator enabled version of i.any(f)
IntoIterator
i.any(f)
use itertools::any; assert!(any(&[0, -1, 2], |elt| *elt > 0));