use `Array.reverse` instead of `swapRange`