The original is a function of x when its inputs are distinct; its swap fails when an output repeats. The set {(1,5),(2,5),(3,6)} has distinct inputs but the output 5 twice.
swap={(5,1),(5,2),(6,3)} repeats the first coordinate 5
So it is a function whose swap is not. The set with a repeated input 1 is not even a function of x; the other two swap to functions.