method iter.toList
The same as collect().
Example:
fn main() io {
print("{[3, 1].iter().toList()}")
}Output
[3, 1]
pub(api) move fn toList() -> List<T>Complexity. O(n).
Since. 1.0.0-beta
Returns
List<T>
Effects
none declared (pure unless the body says otherwise)
Defined in: std/core/iter.oxl:562