2025-03-16 17:24:43 +01:00
|
|
|
## Table
|
|
|
|
| Topic | Description | Confidence |
|
|
|
|
|-------|-------------|------------|
|
|
|
|
| Signatures | Checking whether the expression types are correct | 😐 |
|
|
|
|
| Programming | Writing code to solve an algorithmic problem | 😐 |
|
|
|
|
| Higher order functions | Demonstrate understanding of higher order functions, usually by chaining them | 😊 |
|
|
|
|
| List comprehensions | Demonstrate understanding of list comprehensions | 😊 |
|
|
|
|
| Recursion/infinite lists | Infinitely generating lists, usually by recursion and/or list comprehensions | 😐 |
|
|
|
|
| ADTs | Algebraic Data Types, usually defining a data type and writing functions that operate on it | 😕 |
|
|
|
|
| Proof on lists | Proving properties of functions that operate on lists | 😕 |
|
|
|
|
| Proof on trees/ADTs | Proving properties of functions that operate on trees or ADTs | 😕 |
|
|
|
|
|
2025-03-16 17:25:05 +01:00
|
|
|
|
|
|
|
## Deducing types systematically
|
|
|
|
|
|
|
|
### (:).(:)
|
2025-03-16 17:24:43 +01:00
|
|
|
```hs
|
|
|
|
expr = (:) . (:)
|
|
|
|
|
|
|
|
(:) :: a -> [a] -> [a]
|
|
|
|
(.) :: (c -> d) -> (b -> c) -> b -> d
|
|
|
|
|
|
|
|
=>
|
|
|
|
|
|
|
|
a -> ([a] -> [a]) = b -> c
|
|
|
|
|
|
|
|
b = a
|
|
|
|
c = [a] -> [a]
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
a' -> [a'] -> [a'] = c -> d
|
|
|
|
a -> [a] -> [a] = b -> c
|
|
|
|
|
|
|
|
b = a
|
|
|
|
c = [a] -> [a]
|
|
|
|
|
|
|
|
a' = [a] -> [a]
|
|
|
|
[[a] -> [a]] -> [[a] -> [a]] = d
|
|
|
|
|
|
|
|
|
|
|
|
expr :: b -> d
|
|
|
|
=>
|
|
|
|
expr :: a -> [[a] -> [a]] -> [[a] -> [a]]
|
|
|
|
```
|
|
|
|
|
|
|
|
|
2025-03-16 17:25:05 +01:00
|
|
|
### `f = \x y -> x (x (x y))` [^1]
|
2025-03-16 17:24:43 +01:00
|
|
|
|
|
|
|
```hs
|
|
|
|
f = \x y -> x (x (x y))
|
|
|
|
```
|
|
|
|
|
2025-03-16 17:25:05 +01:00
|
|
|
## Questions
|
2025-03-16 17:24:43 +01:00
|
|
|
> How does one do the equations?
|
|
|
|
|
2025-03-16 17:25:05 +01:00
|
|
|
> CLI is functional?
|
2025-03-16 17:24:43 +01:00
|
|
|
|
2025-03-16 17:25:05 +01:00
|
|
|
> Lazy and singly-linked lists, what's the relation?
|
2025-03-16 17:24:43 +01:00
|
|
|
|
2025-03-16 17:25:05 +01:00
|
|
|
> Y combinator?
|
2025-03-16 17:24:43 +01:00
|
|
|
|
|
|
|
|
|
|
|
## Resources
|
|
|
|
- [course](https://www.cis.upenn.edu/~cis1940/spring15/lectures.html)
|
2025-03-16 17:25:05 +01:00
|
|
|
- [standard list](https://hackage.haskell.org/package/base-4.21.0.0/docs/Data-List.html)
|
|
|
|
|
|
|
|
[^1]: need to find the actual rigorous way of doing this
|