I want to apply TreeForm
to some expressions of the form m[m[m[y[1], y[1]], x[1]], z]
, but I want Mathematica to treat expressions of the form x[i]
or y[i]
as atoms. For instance,
TreeForm[m[m[m[y[1], y[1]], x[1]], z]]
outputs
but I would like the leaves to be y[1]
, y[1]
, x[1]
and z
. How can I do this?