Declare tuple type of arbitrary length

Is there any way I can declare a type for my dictionary with a tuple of the same element type but of arbitrary length?

For example I can currently do this:

d = Dict{Tuple{Int, Int}, String}()
d[(1, 2)] = "a"

and get a dictionary that supports keys that are tuples of length 2. But I would like to parameterize the length of this tuple - for example I would like to do something like

d = Dict{Tuple{Int, N}, String}()
x = (1, 2, ..., N) # the length of this tuple is N
d[x] = "a"

How could I do this? I have scoured the documentation but could not figure it out. Thanks in advance!

EDIT:: NTuple{N, T} is what I was looking for. Never mind!!

2 Likes