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