No, since the only thing the compiler sees is Vector{Any}.
On Friday, August 12, 2016 at 11:36:54 PM UTC+2, Chris Stook wrote:
>
> Is there a way to dispatch on the type of the first element of an array
> without passing the first element as a separate argument.
>
> for example:
>
> a = Array{Any,1}
>
> function f(a::Array{Any,1}, a1::Int)
> # do int stuff here
> end
> function f(a::Array{Any,1}, a1::Float64)
> # do float stuff here
> end
>
> # call like this
> f(a, a[1]) # better way?
>
> # would prefer to call like this
> f(a)
>
> Thanks,
> Chris
>