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()}")
}Вывод
[2, 3, 4]
pub(api) move fn intoIter() -> iter<T>Сложность. O(1): the list moves into the iterator.
С версии. 1.0.0-beta
Возвращает
iter<T>
Эффекты
не объявлены (чистая, пока тело не говорит иное)
Определено в: std/core/iter.oxl:829