Alias of Vector.set
.
Set an element in a vector using a Nat
index, with a tactic provided proof that the index is in
bounds.
This will perform the update destructively provided that the vector has a reference count of 1.
Equations
Instances For
Alias of Vector.setIfInBounds
.
Set an element in a vector using a Nat
index. Returns the vector unchanged if the index is out of
bounds.
This will perform the update destructively provided that the vector has a reference count of 1.
Equations
Instances For
Alias of Vector.swap
.
Swap two elements of a vector using Fin
indices.
This will perform the update destructively provided that the vector has a reference count of 1.
Equations
Instances For
Alias of Vector.swapIfInBounds
.
Swap two elements of a vector using Nat
indices. Panics if either index is out of bounds.
This will perform the update destructively provided that the vector has a reference count of 1.
Equations
Instances For
Alias of Vector.swapAt
.
Swaps an element of a vector with a given value using a Fin
index. The original value is returned
along with the updated vector.
This will perform the update destructively provided that the vector has a reference count of 1.
Equations
Instances For
Alias of Vector.take
.
Extract the first m
elements of a vector. If m
is greater than or equal to the size of the
vector then the vector is returned unchanged.
Equations
Instances For
Alias of Vector.eraseIdx
.
Delete an element of a vector using a Nat
index and a tactic provided proof.
Equations
Instances For
Use #v[]
instead.
Equations
- Vector.empty α = { toArray := #[], size_toArray := ⋯ }