From 57eaa378c6dcb7a0d3c769c9bd3a978be89098c2 Mon Sep 17 00:00:00 2001 From: Dane Sabo Date: Mon, 24 Feb 2025 20:37:03 -0500 Subject: [PATCH] vault backup: 2025-02-24 20:37:03 --- 3-99 Research/Haskell/Chapter 2 - Starting Out.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/3-99 Research/Haskell/Chapter 2 - Starting Out.md b/3-99 Research/Haskell/Chapter 2 - Starting Out.md index a5cabc236..249b92116 100644 --- a/3-99 Research/Haskell/Chapter 2 - Starting Out.md +++ b/3-99 Research/Haskell/Chapter 2 - Starting Out.md @@ -137,3 +137,10 @@ length' xs = sum [1 | _ <- xs] removeNonUppercase st = [ c | c <- st, c `elem` ['A'..'Z']] ``` +Finally, list comprehensions can be nested. So we can use a comprehension to extract a list from a set of lists, and then use another comprehension on that lsit itself. + +## Tuples +Tuples are somewhat confused with lists, but they are not exactly the same. + +Tuples are useful in specific cases. Namely, when an explicit number of elements and their types are known. Tuples are designated by parentheses '()' +