Skip to content

Commit b6263dc

Browse files
committed
Clarify the type of lists
1 parent 294cca6 commit b6263dc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

_posts/2024-08-28-typing-lists-and-tuples.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ Luckily, it is common in Elixir to use the `!` suffix to encode the possibility
115115

116116
Now that we have discussed lists, we can talk about tuples. In a way, tuples are more challenging than lists for two reasons:
117117

118-
1. A list is a collection where all elements have the same type, while tuples carry the types of each element
118+
1. A list is a collection where all elements have the same type (be it a `list(integer())` or `list(integer() or float())`), while tuples carry the types of each element
119119

120120
2. We natively access tuples by index, instead of its head and tail, such `elem(tuple, 0)`
121121

0 commit comments

Comments
 (0)