I have a matrix M[2][2] and want to make a call to function dontModify(M) that will play around with the elements of M but not change them. Something like:
dontModify(M):
swap off-diagonal elements;
take determinant of M;
return determinant;
...but without having the function change M in the process. Anything convenient that would accomplish this?