method List.intoIter
Lazy iterator that takes the list over (no copy).
Example:
fn main() io {
let xs = [1, 2, 3]
print("{xs.intoIter().map(x => x + 1).collect()}")
}Output
[2, 3, 4]
pub(api) move fn intoIter() -> iter<T>Complexity. O(1): the list moves into the iterator.
Since. 1.0.0-beta
Returns
iter<T>
Effects
none declared (pure unless the body says otherwise)
Defined in: std/core/iter.oxl:829