method List.all
True when p holds for every element.
Example:
fn main() io {
print("{[1, 2, 3].all(x => x > 0)} {[1, 2, 3].all(x => x > 1)}")
}Output
true false
pub(api) fn all<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:508