Why does Julia not fully describe the type of the elements of the pair vector?
shouldn’t it be the union of the types of the individual elements of the vector?
Pair{Tuple{Char, Int64, Int64}, Float64}
#and
Pair{Tuple{Char, Int64, Int64}, Nothing}
18-element Vector{Pair{Tuple{Char, Int64, Int64}}}:
('p', 1, 2) => 2.5
('q', 1, 2) => 2.5
('p', 1, 7) => 4.1
('q', 1, 7) => nothing
('p', 2, 3) => 7.4
('q', 2, 3) => 7.4
('p', 2, 5) => nothing
('q', 2, 5) => 5.6
('p', 3, 4) => nothing
('q', 3, 4) => nothing
('p', 3, 5) => nothing
('q', 3, 5) => nothing
('p', 4, 1) => nothing
('q', 4, 1) => nothing
('p', 4, 5) => nothing
('q', 4, 5) => nothing
('p', 5, 2) => nothing
('q', 5, 2) => 3.2
julia> typeof([ (person,pair...)=>person_values(person,pair...) for (person,pair) in
Iterators.product(Persons,Pairs)][:])
Vector{Pair{Tuple{Char, Int64, Int64}}} (alias for Array{Pair{Tuple{Char, Int64, Int64}}, 1})
julia> typeof([ (person,pair...)=>person_values(person,pair...) for (person,pair) in
Iterators.product(Persons,Pairs)][:][1])
Pair{Tuple{Char, Int64, Int64}, Float64}
julia> typeof([ (person,pair...)=>person_values(person,pair...) for (person,pair) in
Iterators.product(Persons,Pairs)][:][4])
Pair{Tuple{Char, Int64, Int64}, Nothing}