# Map over vector with union eltype makes type-inference worse

**URL:** <https://discourse.julialang.org/t/map-over-vector-with-union-eltype-makes-type-inference-worse/97332>\
**Category:** General Usage\
**Tags:** question, type-stability, map\
**Created:** [April 11, 2023, 8:55am UTC](https://discourse.julialang.org/t/map-over-vector-with-union-eltype-makes-type-inference-worse/97332 "2023-04-11T08:55:24Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![Benny](https://avatars.discourse-cdn.com/v4/letter/b/49beb7/32.png) [@Benny](https://discourse.julialang.org/u/Benny)\
**Post date:** [April 12, 2023, 2:15am UTC](https://discourse.julialang.org/t/map-over-vector-with-union-eltype-makes-type-inference-worse/97332/3 "2023-04-12T02:15:16Z")

</div>

OP knows this, but related [thread](https://discourse.julialang.org/t/type-inference-for-map-and-broadcast-differs-on-empty-vectors/97321).

---

_[View the full topic](https://discourse.julialang.org/t/map-over-vector-with-union-eltype-makes-type-inference-worse/97332)._
