mirror of
https://github.com/odin-lang/Odin.git
synced 2026-04-19 13:00:28 +00:00
Fix slice.reverse
This commit is contained in:
@@ -77,8 +77,7 @@ swap_between :: proc(a, b: $T/[]$E) {
|
||||
reverse :: proc(array: $T/[]$E) {
|
||||
n := len(array)/2
|
||||
for i in 0..<n {
|
||||
a, b := i, len(array)-i-1
|
||||
array[a], array[b] = array[b], array[a]
|
||||
swap(array, i, len(array)-i-1)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user