OxL Reference

method iter.max

The largest element, or none for an empty sequence.

Example:

oxl✓ checked in CI
fn main() io {
  print("{[3, 1, 2].iter().max()}")
}
Output
3
pub(api) move fn max() -> T? where T: Ord

Complexity. O(n).

Since. 1.0.0-beta

Returns

T? where T: Ord

Effects

none declared (pure unless the body says otherwise)

Defined in: std/core/iter.oxl:786

See also