vault backup: 2025-02-24 20:37:03
This commit is contained in:
parent
3c9a5311cd
commit
57eaa378c6
@ -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 '()'
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user