How to print in REPL the code of functions in Julia?

后端 未结 4 907
清歌不尽
清歌不尽 2021-01-14 12:09

In Julia, a lot of the Base and closer related functions are also written in pure Julia, and the code is easily avaible. One can skim through the repository or the local dow

4条回答
  •  遥遥无期
    2021-01-14 12:35

    @edit functioninquestion() will open up your editor to the location of the method given. It probably wouldn't be to hard to take the same information used by @edit and use it to open the file and skip to the method definition, and then display it directly in the REPL (or Jupyter). EDIT: While I was answering, somebody else mentioned @less, which seems to do exactly what you want already.

提交回复
热议问题