I have a dynamic list of function names, like {f1, f2, f3, ...}
, and they will enter in computation in various forms f1[_][_,_,_], f2[_,_], ...
, etc.
I am hoping for a function to automatically extract their root function names f1, f2, ...
; so far I am brute-force checking if Head[exp]
or Nest[Head, exp, 2]
, ... but clearly it's ugly.
f[1][_][_,_,_]
instead off1[_][_,_,_]
, etc. ? $\endgroup$f#
. $\endgroup$