That’s the old syntax, @fredrikekre was correct for v0.6 and later.
That doesn’t not mean that the elements of the Vectors can have a different type, that would be:
function foo(x::Vector{Any}, y::Vector{Any})
The following means that both x and y have to have the same element type (which can be Any)
I’ll also point out: if you declare a function like this: function foo(x::Vector{T} where T), you can still obtain the element type of x in the function body using the eltype() function even though you can’t get it from T.
The signature should be defined as: foo(x::Vector{T}) where {T} instead.
Notice you are indeed able to get the type of the Vector from T as well as from eltype(x), ie.:
julia> function foo(x::Vector{T}) where {T}
@show(T, T == eltype(x))
return nothing
end
foo (generic function with 1 method)
julia> a = rand(5);
julia> b = rand(Int, 5);
julia> foo(a)
T = Float64
T == eltype(x) = true
julia> foo(b)
T = Int64
T == eltype(x) = true