method iter.max
The largest element, or none for an empty sequence.
Example:
fn main() io {
print("{[3, 1, 2].iter().max()}")
}Output
3
pub(api) move fn max() -> T? where T: OrdComplexity. 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