Julia 显示repl中的函数源代码

Julia 显示repl中的函数源代码,julia,Julia,我想在REPL中查看方法的定义。我遵循此链接()但它不起作用: julia> f(x) = x^2 f (generic function with 1 method) julia> expand(f) f (generic function with 1 method) julia> methods(f) # 1 method for generic function "f": f(x) at REPL[155]:1 julia> implementation(f

我想在REPL中查看方法的定义。我遵循此链接()但它不起作用:

julia> f(x) = x^2
f (generic function with 1 method)

julia> expand(f)
f (generic function with 1 method)

julia> methods(f)
# 1 method for generic function "f":
f(x) at REPL[155]:1

julia> implementation(f,1)
ERROR: UndefVarError: implementation not defined
 in eval_user_input(::Any, ::Base.REPL.REPLBackend) at ./REPL.jl:64
 in macro expansion at ./REPL.jl:95 [inlined]
 in (::Base.REPL.##3#4{Base.REPL.REPLBackend})() at ./event.jl:68

方法
实现
似乎不存在。

我认为还没有实现直接的方法

这里有一位创作者在6个月前这么说,但似乎没有,因为有一些重复的问题


您的意思是对于您在REPL中也定义的方法?因为如果该方法是在文件中定义的,则至少在unix/osx上可以使用
@less