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