method List.any
True when p holds for at least one element.
Example:
fn main() io {
print("{[1, 2, 3].any(x => x > 2)} {[1, 2, 3].any(x => x > 5)}")
}Output
true false
pub(api) fn any<effect F>(p: fn(T) -> bool F) -> bool FSince. 1.0.0-beta
Parameters
| Name | Type |
|---|---|
p | fn(T) -> bool F |
Returns
bool F
Effects
none declared (pure unless the body says otherwise)
Defined in: std/core/collections.oxl:493