OxL Reference

method iter.toList

The same as collect().

Example:

oxl✓ checked in CI
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

See also