Get the argument names of an function

using the following code from https://github.com/JuliaLang/julia/blob/master/base/methodshow.jl (Vector{Any} changed to Vector{Symbol})

function method_argnames(m::Method)
    argnames = ccall(:jl_uncompress_argnames, Vector{Symbol}, (Any,), m.slot_syms)
    isempty(argnames) && return argnames
    return argnames[1:m.nargs]
end

and then

ms = collect(methods(f))
method_argnames(last(ms))[2:end]

you’ll get

3-element Array{Symbol,1}:
 :x
 :y
 :z
9 Likes