Skip to content

Commit e5e32fc

Browse files
committed
Merge pull request #17 from ccmtaylor/patch-1
prepending to lists is efficient
2 parents b1c1a20 + f7a191d commit e5e32fc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

content/vector.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ list (indexing to position N requires N pointer dereferences).
136136
By contract, vectors are stored in a packed format in memory, meaning indexing
137137
is an O(1) operation, and the memory overhead per additional item in the vector
138138
is much smaller (depending on the type of vector, which we'll cover in a
139-
moment). However, compared to lists, appending an item to a vector is
139+
moment). However, compared to lists, prepending an item to a vector is
140140
relatively expensive: it requires creating a new buffer in memory, copying the
141141
old values, and then adding the new value.
142142

0 commit comments

Comments
 (0)