# How do I see what's inside a function?

**URL:** <https://discourse.julialang.org/t/how-do-i-see-whats-inside-a-function/88599>\
**Category:** New to Julia\
**Created:** [October 11, 2022, 10:26pm UTC](https://discourse.julialang.org/t/how-do-i-see-whats-inside-a-function/88599 "2022-10-11T22:26:48Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![Jollywatt](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jollywatt/32/202198_2.png) [@Jollywatt](https://discourse.julialang.org/u/Jollywatt)\
**Post date:** [October 12, 2022, 12:52am UTC](https://discourse.julialang.org/t/how-do-i-see-whats-inside-a-function/88599/4 "2022-10-12T00:52:16Z")

</div>

> [@chadagreene](#):
>
> It seems crazy to me that Julia knows what expression is inside `foo`, but she won’t tell me what it is.

I don’t actually think Julia does know what the original expression is — only the parsed (or “lowered”) version, which can be retrieved as follows:

```julia
julia> f(a, b) = a + b
f (generic function with 1 method)

julia> @code_lowered f(1, 2)
CodeInfo(
1 ─ %1 = a + b
└── return %1
)

```

See also `Base.uncompressed_ast(::Method)` as in [here](https://discourse.julialang.org/t/source-code-of-a-function/4499/4).

I might be mistaken, and this might change in the future if [JuliaSyntax,jl](https://github.com/JuliaLang/JuliaSyntax.jl) replaces the current parser, but otherwise the way to go is to put functions you want to use for longer than one sitting in a file and use `@edit` and `@which` to jump to them from the REPL.

---

_[View the full topic](https://discourse.julialang.org/t/how-do-i-see-whats-inside-a-function/88599)._
