# Concatenate empty list of arrays

**URL:** <https://discourse.julialang.org/t/concatenate-empty-list-of-arrays/16974>\
**Category:** General Usage\
**Created:** [October 30, 2018, 3:06pm UTC](https://discourse.julialang.org/t/concatenate-empty-list-of-arrays/16974 "2018-10-30T15:06:33Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![carstenbauer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/carstenbauer/32/4981_2.png) [@carstenbauer](https://discourse.julialang.org/u/carstenbauer)\
**Post date:** [October 30, 2018, 3:06pm UTC](https://discourse.julialang.org/t/concatenate-empty-list-of-arrays/16974/1 "2018-10-30T15:06:33Z")

</div>

I was suprised by

```julia
julia> x = Array{Float64, 4}[]
0-element Array{Array{Float64,4},1}

julia> cat(x..., dims=4)
0-element Array{Any,1}

```

I guess I expected this to be type stable even in the empty `x` case, i.e. a result like

```julia
julia> zeros(0,0,0,0)
0×0×0×0 Array{Float64,4}

```

Am I the only one who is (a bit) suprised by this?

---

<div class="post-metadata">

**Author:** ![carstenbauer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/carstenbauer/32/4981_2.png) [@carstenbauer](https://discourse.julialang.org/u/carstenbauer)\
**Post date:** [October 30, 2018, 3:11pm UTC](https://discourse.julialang.org/t/concatenate-empty-list-of-arrays/16974/2 "2018-10-30T15:11:36Z")

</div>

Ok, thinking it as two separate operation, splatting and concatenating, I guess it makes sense. Sorry for the spam.
