method RangeInclusive.iter
Lazy iterator over lo..=hi (does not overflow at the maximum value).
Example:
fn main() io {
print("{(1..=3).iter().collect()}")
}Output
[1, 2, 3]
pub(api) fn iter() -> iter<T> where T: OrdComplexity. O(1) to build, O(1) per element.
Since. 1.0.0-beta
Returns
Effects
none declared (pure unless the body says otherwise)
Defined in: std/core/iter.oxl:1009