OxL Reference

method RangeInclusive.iter

Lazy iterator over lo..=hi (does not overflow at the maximum value).

Example:

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

Complexity. O(1) to build, O(1) per element.

Since. 1.0.0-beta

Returns

iter<T> where T: Ord

Effects

none declared (pure unless the body says otherwise)

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

See also