# Printing the body of a defined function

**URL:** <https://discourse.julialang.org/t/printing-the-body-of-a-defined-function/23439>\
**Category:** General Usage\
**Created:** [April 23, 2019, 12:09pm UTC](https://discourse.julialang.org/t/printing-the-body-of-a-defined-function/23439 "2019-04-23T12:09:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![srb](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/srb/32/6812_2.png) [@srb](https://discourse.julialang.org/u/srb)\
**Post date:** [April 23, 2019, 12:09pm UTC](https://discourse.julialang.org/t/printing-the-body-of-a-defined-function/23439/1 "2019-04-23T12:09:48Z")

</div>

If I define a function as follows:

```julia
f(x,y) = x^2 + y

```

Is there a way that I acces the body of the function without evaluating it? As in, I would like to do print(f) and for it to show `"x^2 + y"`

---

<div class="post-metadata">

**Author:** ![stevengj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stevengj/32/71_2.png) [@stevengj](https://discourse.julialang.org/u/stevengj)\
**Post date:** [April 23, 2019, 12:17pm UTC](https://discourse.julialang.org/t/printing-the-body-of-a-defined-function/23439/2 "2019-04-23T12:17:39Z")

</div>

[https://github.com/JuliaLang/julia/issues/2625](https://github.com/JuliaLang/julia/issues/2625)

---

<div class="post-metadata">

**Author:** ![baggepinnen](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/baggepinnen/32/693_2.png) [@baggepinnen](https://discourse.julialang.org/u/baggepinnen)\
**Post date:** [April 23, 2019, 4:09pm UTC](https://discourse.julialang.org/t/printing-the-body-of-a-defined-function/23439/3 "2019-04-23T16:09:29Z")

</div>

See [https://github.com/timholy/CodeTracking.jl](https://github.com/timholy/CodeTracking.jl)  
Maybe you’ll find it useful
