In[]:=
skState[expr:f_[arg_]]:=Join[{DirectedEdge[expr,f,"Head"],DirectedEdge[expr,arg,"Argument"]},skState[f],skState[arg]]
In[]:=
skState[s|k]:={}
In[]:=
skGraph[expr_,opts___]:=Graph[DeleteDuplicates[skState[expr]],opts]
In[]:=
skGraph[s[s[s]][s][s[s][k]][k],VertexLabelsAutomatic]
Out[]=
In[]:=
skGraph[s[k],VertexLabelsAutomatic]
Out[]=
In[]:=
skGraph[s[s],VertexLabelsAutomatic]
Out[]=
It matters what is on the left and what on the right in the tree....
It matters what is on the left and what on the right in the tree....
"ABBBAAABBBAAAABBBAAAA"
e[x][y]x[x[y]]
{{e[x][y],e[x],y},{e[x],e,x}}XXXX
{x[x[y]],x,x[y]}
functional form
functional form
f[g[x,y],z]g[f[x],z]
typed WM
typed WM
{f[x_,y_],g[x_,y_,z_],f[x_,z_]}XXXXX