I'm interested in symmetric functions of two variables $f(x,y)$ with the property that $f(f(x,y),z)$ is symmetric in $x,y,$ and $z$ (or equivalently, symmetric functions such that $f(f(x,y),z) = f(f(x,z),y)$).
a) Given a non-symmetric function $g(x,y)$, we can make a symmetric one $f(x,y) = 0.5*[g(x,y) + g(y,x)]$. Is there an analogous procedure to take a symmetric function $f(x,y)$ and make a new one which has the above property?
b) Is there a better way to characterize functions $f$ which have this property?