2025-03-16 17:25:05 +01:00

1.6 KiB

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 😕

Deducing types systematically

(:).(:)

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]]

f = \x y -> x (x (x y)) 1

f = \x y -> x (x (x y))

Questions

How does one do the equations?

CLI is functional?

Lazy and singly-linked lists, what's the relation?

Y combinator?

Resources


  1. need to find the actual rigorous way of doing this ↩︎