Is it possible in Mathematica to have function recognize its name? Say FunFunction[blah blah blah
];
Is there a way, while still inside the function, for the function to recognize its own name?
Mathematica Stack Exchange is a question and answer site for users of Wolfram Mathematica. It only takes a minute to sign up.
Sign up to join this community
Stack
maybe. $\endgroup$f[x_] := (Print["My name is ", f]; x^2)
$\endgroup$call : f[x_] := (Print["Hi! You called ", HoldForm[call]]; x^2)
and thenf[4]
. $\endgroup$