Also the Val(N) bit was unnecessary
julia> function foo_ntuple3(t::Pair{Symbol,Int64}...)
t1 = ntuple(i->t[i][1], length(t))
t2 = ntuple(i->t[i][2], length(t))
return nothing
end
foo_ntuple3 (generic function with 1 method)
julia> @descend foo_ntuple3(:a=>1, :b=>2, :c=>3)
foo_ntuple3(t::Pair{Symbol, Int64}...) @ Main REPL[55]:1
1 function foo_ntuple3(t::Tuple{Pair{Symbol, Int64}, Pair{Symbol, Int64}, Pair{Symbol, Int64}}::Pair{Symbol,Int64}...)::Core.Const(nothing)
2 t1::Tuple{Symbol, Symbol, Symbol} = ntuple(i->t[i][1], length(t::Tuple{Pair{Symbol, Int64}, Pair{Symbol, Int64}, Pair{Symbol, Int64}})::Core.Const(3))::Tuple{Symbol, Symbol, Symbol}
3 t2::Tuple{Int64, Int64, Int64} = ntuple(i->t[i][2], length(t::Tuple{Pair{Symbol, Int64}, Pair{Symbol, Int64}, Pair{Symbol, Int64}})::Core.Const(3))::Tuple{Int64, Int64, Int64}
4 return nothing::Core.Const(nothing)
5 end
Select a call to descend into or ↩ to ascend. [q]uit. [b]ookmark.
Toggles: [w]arn, [h]ide type-stable statements, [t]ype annotations, [s]yntax highlight for Source/LLVM/Native, [j]ump to source always.
Show: [S]ource code, [A]ST, [T]yped code, [L]LVM IR, [N]ative code
Actions: [E]dit source code, [R]evise and redisplay
• length(t)
length(t::Tuple{Pair{Symbol, Int64}, Pair{Symbol, Int64}, Pair{Symbol, Int64}})
ntuple(i->t[i][1], length(t::Tuple{Pair{Symbol, Int64}, Pair{Symbol, Int64}, Pair{Symbol, Int64}})::Core.Const(3))
length(t)
length(t::Tuple{Pair{Symbol, Int64}, Pair{Symbol, Int64}, Pair{Symbol, Int64}})
ntuple(i->t[i][2], length(t::Tuple{Pair{Symbol, Int64}, Pair{Symbol, Int64}, Pair{Symbol, Int64}})::Core.Const(3))
↩