Leave first type unspecified

Suppose I have a type with multiple parameters and that I want to define a function that dispatch only on the second parameter. Is there a way to leave the first parameter unspecified?

As an example, I would like to define this function below without defining N since I don’t use it in the body of the function

function f(x::NTuple{N, <: AbstractVector}) where {N}
   ...
end

This is correct. You could have an alias which swaps type-parameters and then you could get rid of the N:

const MyNTuple{T,N} = NTuple{N,T}
function f(x::MyNTuple{<:AbstractVector})
...
end
2 Likes