OxL Reference

method iter.last

Last element or none (pulls them all).

Example:

oxl✓ checked in CI
fn main() io {
  print("{[7, 8].iter().last()}")
}
Output
8
pub(api) move fn last() -> T?

Complexity. O(n).

Since. 1.0.0-beta

Returns

T?

Effects

none declared (pure unless the body says otherwise)

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

See also