All vectors formed by picking one element from each vector

Check out the built-in Iterators.product function:

help?> Iterators.product
  product(iters...)

  Return an iterator over the product of several iterators. Each generated element is a tuple whose ith element comes from the ith argument iterator. The first iterator changes the fastest.

  Examples
  ≡≡≡≡≡≡≡≡≡≡

  julia> collect(Iterators.product(1:2, 3:5))
  2×3 Array{Tuple{Int64,Int64},2}:
   (1, 3)  (1, 4)  (1, 5)
   (2, 3)  (2, 4)  (2, 5)

Note that product expects each iterator to be a separate argument, so you can take the product of an array of iterators by doing product(my_vector_of_vectors...) using ... to splat the collection into multiple arguments.

Also, you may get better performance by storing a tuple of vectors instead of a vector of vectors, since your individual inner vectors have different types. That would look like:

julia> data = (['a', 'b'], [1, 2, 3], ['x'])
(['a', 'b'], [1, 2, 3], ['x'])

julia> Iterators.product(data...)
2 Likes