# Iterating through types of a Union in a type-stable manner

**URL:** <https://discourse.julialang.org/t/iterating-through-types-of-a-union-in-a-type-stable-manner/58285>\
**Category:** General Usage\
**Tags:** question, performance\
**Created:** [March 31, 2021, 10:58am UTC](https://discourse.julialang.org/t/iterating-through-types-of-a-union-in-a-type-stable-manner/58285 "2021-03-31T10:58:48Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![lmiq](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lmiq/32/18314_2.png) [@lmiq](https://discourse.julialang.org/u/lmiq)\
**Post date:** [March 31, 2021, 11:41am UTC](https://discourse.julialang.org/t/iterating-through-types-of-a-union-in-a-type-stable-manner/58285/2 "2021-03-31T11:41:42Z")

</div>

Take a look at this thread and other threads that are referenced in it: [Macro to write function with many conditionals](https://discourse.julialang.org/t/macro-to-write-function-with-many-conditionals/51616)

There is no simple answer, although there are many possibilities.

---

_[View the full topic](https://discourse.julialang.org/t/iterating-through-types-of-a-union-in-a-type-stable-manner/58285)._
