Skip to content

Commit 3bfb6f9

Browse files
committed
Document .remove of vectors
1 parent 54eb78b commit 3bfb6f9

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

doc/1.4/language.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1774,6 +1774,13 @@ supports the following operations:
17741774
Inserts _`item`_ at index _`index`_ within _`v`_. This operation is O(n)
17751775
unless _`index`_ is up to one element away from either end of the vector, in
17761776
which case it's O(1) amortized.
1777+
* <pre><em>v</em>.remove(<em>index<em>)</pre>
1778+
Remove and return the element at index _`index`_ within _`v`_. This requires
1779+
the vector to be non-empty. If that is not upheld, then an assertion will be
1780+
failed at run-time.
1781+
1782+
This operation is O(n) unless _`index`_ is up to one element away from either
1783+
end of the vector, in which case it's O(1) amortized.
17771784
* <pre><em>v</em>.len</pre>
17781785
Evaluates to the length of the vector.
17791786

0 commit comments

Comments
 (0)