Use the fieldtypes function:
fieldtypes(Tuple{Float64, Int}) === (Float64, Int) # true
@generated function bar(t::Tuple)
for c ∈ fieldtypes(t)
Core.println(c)
end
return :( Core.println("bar !") )
end
bar((3.,1))
Use the fieldtypes function:
fieldtypes(Tuple{Float64, Int}) === (Float64, Int) # true
@generated function bar(t::Tuple)
for c ∈ fieldtypes(t)
Core.println(c)
end
return :( Core.println("bar !") )
end
bar((3.,1))