OxL Reference

init List.new

Empty list.

Example:

oxl✓ checked in CI
fn main() io {
  let xs = List<i32>.new()
  print("{xs.len()}")
}
Output
0
pub(api) init new() -> Self

Since. 1.0.0-beta

Returns

Self

Effects

none declared (pure unless the body says otherwise)

Defined in: std/core/collections.oxl:31

See also