BeginPackage["CSM`SortAux`"]

swap::usage = "swap[l, i, j] exchanges elements i and j of the value of l."

Begin["`Private`"]

SetAttributes[swap, {HoldFirst}]

swap[l_Symbol, i_, j_] := ({l[[i]], l[[j]]} = {l[[j]], l[[i]]}; l)

End[]

EndPackage[]
