I'm trying to do a simple thing: I want the optional argument to depend on another argument, i.e.
f[x_,y_:Subscript[m,x]] := x-y
This should give: f[z] = z-Subscript[m,z] and f[z,y] = z-y
Any idea how I can get this to work? I've tried f[x_,y_:>Subscript[m,x]] := x-y
f? That is:f[x_] := x - Subscript[m, x]; f[x_, y_] := x - y$\endgroup$