vault backup: 2025-02-24 20:37:03

This commit is contained in:
Dane Sabo 2025-02-24 20:37:03 -05:00
parent 3c9a5311cd
commit 57eaa378c6

View File

@ -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 '()'