I am trying to construct an array of arrays involving list comprehension in 
Julia 0.4

julia> [ [1,2]; [[i-1,i,i+1] for i=2:4] ]
5-element Array{Any,1}:
 1       
 2       
  [1,2,3]
  [2,3,4]
  [3,4,5]

where what I want is [ [1,2], [1,2,3], [2,3,4], [3,4,5] ].

I suppose I have to use T[ ] notation now, and I've tried:
julia> Array{Int,1}[ [1,2]; Array{Int,1}[[i-1,i,i+1] for i=2:4] ]

and other variations without any luck.

How would I construct such an array?

Reply via email to