Concatenate empty list of arrays


I was suprised by

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> zeros(0,0,0,0)
0×0×0×0 Array{Float64,4}

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


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