Parameters
x
i0
i1
Return value
Return x with element i0 and i1 swapped. Action on scalar is identity. Assert if i0 or i1 are out of range.