Migrated
This commit is contained in:
36
Functional Programming/Lists.md
Normal file
36
Functional Programming/Lists.md
Normal file
@ -0,0 +1,36 @@
|
||||
---
|
||||
type: mixed
|
||||
---
|
||||
### Stuff
|
||||
- Definition and syntax of lists
|
||||
- List comprehension:
|
||||
- Set comprehensions and list comprehension
|
||||
- Generators (pattern <- list expression)
|
||||
- Tests (Boolean expressions within list comprehension)
|
||||
- Multiple generators and dependent generators
|
||||
- Meaning of list comprehensions
|
||||
- Important list functions:
|
||||
- `length`
|
||||
- `++` (concatenation)
|
||||
- `reverse`
|
||||
- `replicate`
|
||||
- `head`, `last`, `tail`, `init`
|
||||
- `take`, `drop`
|
||||
- `concat`
|
||||
- `zip`, `unzip`
|
||||
- `and`, `or`, `sum`, `product`
|
||||
- Pattern matching on lists:
|
||||
- Constructors: `[]` (empty list) and `:` (cons operator)
|
||||
- Patterns and pattern matching using wildcards (_)
|
||||
- Recursion over lists
|
||||
- Indexing lists using `!!` operator
|
||||
- Examples:
|
||||
- `concat` function using primitive recursion
|
||||
- `insertionSort` function
|
||||
- `zip` and `take` functions using multiple arguments in recursion
|
||||
- `quickSort` function using general recursion
|
||||
- `reverse'` function using an accumulating parameter
|
||||
- `ups` function (finding maximal ascending sublists) using an accumulating parameter
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user