Destructuring vectors of tuples: proper argument type?

Mh, given your last example, I’m not sure if a vector of tuples is really needed in your case.

  • getindex.(mytuples, 1) will allocated a new array. In this sense, very inefficient. I think I misunderstood your problem…
  • The where {T <: Tuple} syntax says that T can be anything which is a subtype of Tuple. That can help if you don’t know how to exactly specify it.

Maybe it would be good to share another minimal example, which shows why exactly you need a vector of tuples.

2 Likes