[−][src]Function iter_python::any
pub fn any(iterable: impl IntoIterator<Item = bool>) -> bool
Python's any(iterable)
function.
Example
ⓘThis code runs with edition 2018
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));