元組
Speaker Notes
This slide should take about 5 minutes.
-
和陣列一樣,元組有固定的長度。
-
元組會將不同型別的值組成複合型別。
-
元組的欄位可透過點號和值的索引存取,例如
t.0
、t.1
。 -
The empty tuple
()
is referred to as the "unit type" and signifies absence of a return value, akin tovoid
in other languages.