julia> functionname(f)=string(f.env.name)
functionname (generic function with 1 method)

julia> foo(x)=1
foo (generic function with 1 method)

julia> functionname(foo)
"foo"

But be aware that this may change and is unlikely to be a good solution
unless you really, really know what you are doing. Perhaps if you
explained what you want to achieve you would get suggestions for better
solutions.

Best,

Tamas


On Sat, Apr 09 2016, K. leo wrote:

> Say a function is named FuncA.  I hope to get this name into a string like
> "FuncA".  Is there a way to do that?

Reply via email to