How to do this ? If there is a function?
I have a large vector with repeating numbers after some interval. I want to slice it just like how showed in second output.
Thank you
julia> a = [1, 1, 1, 1, 2, 2, 2, 2]
12-element Vector{Int64}:
1
1
1
1
2
2
2
2
4×2 Matrix{Int64}:
1 2
1 2
1 2
1 2