OxL Reference

method Range.iter

Lazy iterator over lo..hi (integer and char ranges only: range-not-iterable otherwise).

Example:

oxl✓ checked in CI
fn main() io {
  print("{(1..4).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:941

See also