Function iter_python::any [−][src]
pub fn any(iterable: impl IntoIterator<Item = bool>) -> bool
Expand description
Python’s any(iterable)
function.
Example
ⓘ
use ::iter_python::*;
fn is_not_prime (n: usize) -> bool
{
any(iter!(n % k == 0 for k in (2 ..).take_while(|&k| k * k <= n)))
}
assert!(is_not_prime(91));