aboutsummaryrefslogtreecommitdiff
path: root/lessons/src/lesson030_tuples/text.html
diff options
context:
space:
mode:
authorLouis Pilfold <louis@lpil.uk>2023-12-21 14:03:41 +0000
committerLouis Pilfold <louis@lpil.uk>2023-12-21 14:03:41 +0000
commit4efb34bd728732101432843ed0bfbeb971272287 (patch)
tree71b3b767c417809d92280cec64424c31c9a475be /lessons/src/lesson030_tuples/text.html
parent2a6ae1fa5408247c95bf4a7d59e5038342a2a125 (diff)
downloadtour-4efb34bd728732101432843ed0bfbeb971272287.tar.gz
tour-4efb34bd728732101432843ed0bfbeb971272287.zip
Add chapters
Diffstat (limited to 'lessons/src/lesson030_tuples/text.html')
-rw-r--r--lessons/src/lesson030_tuples/text.html20
1 files changed, 0 insertions, 20 deletions
diff --git a/lessons/src/lesson030_tuples/text.html b/lessons/src/lesson030_tuples/text.html
deleted file mode 100644
index f121a9d..0000000
--- a/lessons/src/lesson030_tuples/text.html
+++ /dev/null
@@ -1,20 +0,0 @@
-<p>
- Lists are good for when we want a collection of one type, but sometimes we
- want to combine multiple values of different types. In this case tuples are a
- quick and convenient option.
-</p>
-<p>
- The tuple access syntax can be used to get elements from a tuple without
- pattern matching. <code>some_tuple.0</code> gets the first element,
- <code>some_tuple.1</code> gets the second element, etc.
-</p>
-<p>
- Tuples are generic types, they have type parameters for the types they
- contain. <code>#(1, "Hi!")</code> has the type <code>#(Int, String)</code>,
- and <code>#(1.4, 10, 48)</code> has the type <code>#(Float, Int, Int)</code>.
-</p>
-<p>
- Tuples are most commonly used to return 2 or 3 values from a function. Other
- times it is often is clearer to use a <em>custom type</em>, which we will
- cover next.
-</p>