OxL Reference

method List.any

True when p holds for at least one element.

Example:

oxl✓ checked in CI
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  F

Since. 1.0.0-beta

Parameters

NameType
pfn(T) -> bool F

Returns

bool F

Effects

none declared (pure unless the body says otherwise)

Defined in: std/core/collections.oxl:493

See also