= ("super", 99) a
("super", 99)
Tuples are often used as function arguments or return values
= ("super", 99) a
("super", 99)
typeof(a)
Tuple{String, Int64}
= (fruit = "mango", number = 1) a
(fruit = "mango", number = 1)
typeof(a)
@NamedTuple{fruit::String, number::Int64}
= (:Key1, :Key2, :Key3)
Keys = (3, 5, 7) Values
(3, 5, 7)
= (; zip(Keys, Values)...) x
(Key1 = 3, Key2 = 5, Key3 = 7)
typeof(x)
@NamedTuple{Key1::Int64, Key2::Int64, Key3::Int64}
= [:One, :Two, :Three]
Keys = [11, 13, 17] Vals
3-element Vector{Int64}:
11
13
17
= (; zip(Keys, Values)...) z
(One = 3, Two = 5, Three = 7)