Substitution in a function



> I'm trying to permute some functions w.r.t. the variables they are
using.

Sublis is an excellent way to do this, as Valerij suggests, but I don't
see any reason for using "''" in front of sublis here.  As a matter of
fact, it appears to be a complete no-op (normally '' means substitute at
parse time -- which would not work here -- but apparently in this
context it does nothing at all).

As for Neilen's original issue of "f:f,u=v,v=w,w=u" not behaving as
expected within a function, the comma notation at the top level is a
shorthand for using the "ev" function.  That is, at the top level
command line,

     f:f, u=v, v=w, w=u;

is completely equivalent to

     ev(f:f, u=v, v=w, w=u);

You can verify this by printing the internal form of your C-line using
?print(C23) or whatever.

Within a function, though, the "ev" must be explicit.  Thus, you could
have said

     ev(f:f,u=v,v=w,w=u) ,

and that will work.  A bit clearer perhaps, would be

     f : ev(f,u=v,v=w,w=u) .

But I agree that sublis is a better way of doing this.

        -s