Commit 9694728 1 parent 0af15f9 commit 9694728 Copy full SHA for 9694728
File tree 1 file changed +5
-2
lines changed
1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -2652,12 +2652,15 @@ attribute [nospecialize] Inhabited
2652
2652
`Array α` is the type of [ dynamic arrays ] (https://en.wikipedia.org/wiki/Dynamic_array)
2653
2653
with elements from `α`. This type has special support in the runtime.
2654
2654
2655
- An array has a size and a capacity; the size is `Array.size` but the capacity
2656
- is not observable from Lean code. Arrays perform best when unshared; as long
2655
+ Arrays perform best when unshared; as long
2657
2656
as they are used "linearly" all updates will be performed destructively on the
2658
2657
array, so it has comparable performance to mutable arrays in imperative
2659
2658
programming languages.
2660
2659
2660
+ An array has a size and a capacity; the size is `Array.size` but the capacity
2661
+ is not observable from Lean code. `Array.mkEmpty n` creates an array which is equal to `#[]`,
2662
+ but internally allocates an array of capacity `n`.
2663
+
2661
2664
From the point of view of proofs `Array α` is just a wrapper around `List α`.
2662
2665
-/
2663
2666
structure Array (α : Type u) where
You can’t perform that action at this time.
0 commit comments