Can't you do something like (x, y) = [y, x] and skip having a method for swapping?