The code
julia> using Symbolics
julia> @variables x[1:5]
julia> x[2:4][1]
(x[2:4])[1]
seems like it should return x[2]
instead. Am I missing something here? My use case here is that I want to do something like
julia> print(x[1:2]...,1,x[4:5]...)
(x[1:2])[1](x[1:2])[2]1(x[4:5])[1](x[4:5])[2]
and have it instead return
x[1]x[2]1x[4]x[5]
Is this expected behavior or a bug? In the former case, is there another way to achieve this or should I just do something like the following?
julia> print([x[i] for i in 1:2]...,1,[x[i] for i in 4:5]...)