On Fri, May 15, 2015 at 5:17 PM, Lytu <[email protected]> wrote: > Is there a command in julia that enables us to see/show the implementation > of a module or a function in julia?
Modules usually defined in packages so I guess you should just checkout the source of each package. As for functions, you can checkout this page[1]. In particular the `code_*` functions and macros. Those do not necessarily give you the source (since even `code_lowered` returns the lowered form of the code which can be very different from the original source). If you want to see where the function is defined, you can checkout `methods`, `edit`, `less` etc. > If yes, which command? > Can we modify the code of an existing module/function? At runtime: You can execute code in a module using that module's `eval` function although it is probably not recommanded except for debugging or learning. Functions can be extended too although you will get a warning if you are overriding a existing definition in another module. If you are talking about developing/contributing, you can just edit the source file. [1] http://julia.readthedocs.org/en/latest/devdocs/reflection/
