您可以使用@which宏:
julia> using StatsBase
julia> @which countmap(rand(1:10, 100))
countmap(x::AbstractArray{T,N} where N; alg) where T in StatsBase at C:\Users\user\.julia\packages\StatsBase\548SN\src\counts.jl:389
Run Code Online (Sandbox Code Playgroud)
请注意,正如文档所述,宏实际上评估特定调用的参数,因为函数可能在不同位置定义了不同的方法。