Compare commits

...

2 Commits

Author SHA1 Message Date
Kim Morrison
0432399d5b Merge remote-tracking branch 'origin/master' into array_swap_docstring 2024-07-31 13:31:24 +10:00
Kim Morrison
3841caa192 chore: correct doc-string for Array.swap! 2024-07-30 22:38:08 +10:00

View File

@@ -108,7 +108,7 @@ def swap (a : Array α) (i j : @& Fin a.size) : Array α :=
a'.set (size_set a i v₂ j) v₁
/--
Swaps two entries in an array, or panics if either index is out of bounds.
Swaps two entries in an array, or returns the array unchanged if either index is out of bounds.
This will perform the update destructively provided that `a` has a reference
count of 1 when called.