# Why does this vector shows elements multiple times?

**URL:** <https://discourse.julialang.org/t/why-does-this-vector-shows-elements-multiple-times/59807>\
**Category:** General Usage\
**Created:** [April 22, 2021, 2:22pm UTC](https://discourse.julialang.org/t/why-does-this-vector-shows-elements-multiple-times/59807 "2021-04-22T14:22:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![HenriDeh](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/henrideh/32/8316_2.png) [@HenriDeh](https://discourse.julialang.org/u/HenriDeh)\
**Post date:** [April 22, 2021, 2:22pm UTC](https://discourse.julialang.org/t/why-does-this-vector-shows-elements-multiple-times/59807/1 "2021-04-22T14:22:43Z")

</div>

Hi,

Is it normal that show has this behavior or I should report a bug ?

```julia
julia> struct Foo
       x
       end
julia> Base.show(io::IO, f::Foo) = print("Foo",f.x)

julia> foos = [Foo(1)]
1-element Vector{Foo}:
Foo1 Foo1Foo1

```

This seems to happen when showing a Vector whose elementtype has a customized `show`.

---

<div class="post-metadata">

**Author:** ![Skoffer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/skoffer/32/378_2.png) [@Skoffer](https://discourse.julialang.org/u/Skoffer)\
**Post date:** [April 22, 2021, 2:26pm UTC](https://discourse.julialang.org/t/why-does-this-vector-shows-elements-multiple-times/59807/2 "2021-04-22T14:26:47Z")

</div>

Shouldn’t it be `print(io, "Foo", f.x)`?

---

<div class="post-metadata">

**Author:** ![HenriDeh](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/henrideh/32/8316_2.png) [@HenriDeh](https://discourse.julialang.org/u/HenriDeh)\
**Post date:** [April 22, 2021, 2:27pm UTC](https://discourse.julialang.org/t/why-does-this-vector-shows-elements-multiple-times/59807/3 "2021-04-22T14:27:34Z")

</div>

Ha yes that’s that… Thank you
