method List.push
Appends an element.
Example:
fn main() io {
var xs: List<i32> = [3, 1, 2]
xs.push(4)
print("{xs}")
}Output
[3, 1, 2, 4]
pub(api) var fn push(x: T)Since. 1.0.0-beta
Parameters
| Name | Type |
|---|---|
x | T |
Effects
none declared (pure unless the body says otherwise)
Defined in: std/core/collections.oxl:96