# Introspection on comprehension expressions

**URL:** <https://discourse.julialang.org/t/introspection-on-comprehension-expressions/31311>\
**Category:** General Usage\
**Tags:** question\
**Created:** [November 20, 2019, 12:45pm UTC](https://discourse.julialang.org/t/introspection-on-comprehension-expressions/31311 "2019-11-20T12:45:09Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![stakaz](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stakaz/32/4740_2.png) [@stakaz](https://discourse.julialang.org/u/stakaz)\
**Post date:** [November 20, 2019, 12:45pm UTC](https://discourse.julialang.org/t/introspection-on-comprehension-expressions/31311/1 "2019-11-20T12:45:09Z")

</div>

Hello, somehow I cannot introspect (`@code_lowered`, `@code_warntype`, …) on comprehension expressions. Is it somehow possible to achieve?

E. g.:

```julia
julia> A = [1,2,3,4,5];

julia> @code_lowered [a^2 for a in A]
ERROR: expression is not a function call, or is too complex for @code_lowered to analyze; break it down to simpler parts if possible

```

Thanks…

P. S. it would be ok for me to at least know how comprehensions are lowered compared to `map` and `filter`.

---

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [November 20, 2019, 12:47pm UTC](https://discourse.julialang.org/t/introspection-on-comprehension-expressions/31311/2 "2019-11-20T12:47:15Z")

</div>

Perhaps you are looking for `Meta.@lower [a^2 for a in A]`.

---

<div class="post-metadata">

**Author:** ![stakaz](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stakaz/32/4740_2.png) [@stakaz](https://discourse.julialang.org/u/stakaz)\
**Post date:** [November 20, 2019, 12:49pm UTC](https://discourse.julialang.org/t/introspection-on-comprehension-expressions/31311/3 "2019-11-20T12:49:26Z")

</div>

> [@Tamas\_Papp](#):
>
> Perhaps you are looking for `Meta.@lower [a^2 for a in A]` .

Yeah, that was what I was searching for, any reason it is not possible with standard `@code_lowered`?

---

<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:** [November 20, 2019, 1:08pm UTC](https://discourse.julialang.org/t/introspection-on-comprehension-expressions/31311/4 "2019-11-20T13:08:12Z")

</div>

If you put the comprehension in a function and inspect the lowered code of that is should work
