RosettaCodeData/Task/Generic-swap/Mathematica/generic-swap.math

3 lines
61 B
Plaintext

swap[a_, b_] := {a, b} = {b, a}
SetAttributes[swap, HoldAll]