This is probably a simple problem, but I'm having a lot of issues with it because I'm unfamiliar with Mathematica syntax.
I have a list
S = {{-1 + x + y}, {x^2 + y}, {x + 2y}}
I am trying to create a function f
which returns a sorted list after substitution, I've tried variations of the following:
f[x_, y_] := Sort[Evaluate[Table[u, {u, S}]]];
but it simply returns the original list. Any help would be much appreciated!