[x;;;y]
[[x;;;y][:,1,:]' ;;;[x;;;y][:,2,:]']
:edited
I remembered a discussion in which the subject of the use of the semicolon was dealt with.
Using the macro Meta. @ Lower I discovered the hvncat function from whose very concise help (*) I could derive the following use. [hvncat((2,3,2),true, [x;y]...)
]
julia> Meta.@lower([x;;;y])
:($(Expr(:thunk, CodeInfo(
@ none within `top-level scope`
1 ─ %1 = Base.hvncat(3, x, y)
└── return %1
))))
julia> x
3×2 reshape(::UnitRange{Int64}, 3, 2) with eltype Int64:
1 4
2 5
3 6
julia> y
3×2 reshape(::UnitRange{Int64}, 3, 2) with eltype Int64:
7 10
8 11
9 12
julia> hvncat((2,3,2),true, [x;y]...)
2×3×2 Array{Int64, 3}:
[:, :, 1] =
1 2 3
7 8 9
[:, :, 2] =
4 5 6
10 11 12
julia> [[x;;;y][:,1,:]' ;;;[x;;;y][:,2,:]']
2×3×2 Array{Int64, 3}:
[:, :, 1] =
1 2 3
7 8 9
[:, :, 2] =
4 5 6
10 11 12
(*) It would be helpful if someone who knows it thoroughly would provide clearer examples of the third method. Explaining where and how it can be useful to use it.