Commit 872969a01392730adda3dfc973a9095d9b3cf9cf

Thomas de Grivel 2025-04-01T12:53:34

doc: write about tuples and their common usage patterns

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
diff --git a/doc/1_KC3/1.22_Tuple.en.md b/doc/1_KC3/1.22_Tuple.en.md
index 17a138e..a238c90 100644
--- a/doc/1_KC3/1.22_Tuple.en.md
+++ b/doc/1_KC3/1.22_Tuple.en.md
@@ -1,6 +1,12 @@
 # 1.22 Tuple
 
-KC3 tuples are arrays of `Tag`.
+KC3 tuples are immutable arrays of `Tag`. They contain a fixed number of
+constant values of any type. Tuple access is very fast.
+
+Tuples can be used to return more than one value from a function.
+For example a successful function call might result in a
+`{:ok, result}` tuple, while an error might produce the
+`{:error, "Message", data, trace}` tuple.
 
 ## 1.22.1 Examples