Course - Functional Programming MT22
The first course in programming, using Haskell as the programming language. This might seem like a strange choice for a first programming language rather than something more conventional like Python. The idea behind this choice is that that you can apply mathematical reasoning to programs, whether functional or not, but using a functional programming language makes this a lot easier to see.
For example, in the lecture on building a Sudoku solver, we started with an inefficient program (try every single solution) and then made logical deductions to end up with an equivalent but much faster program.
There is a very heavy focus on one particular concept:
fold
s, which is also calledreduce
oraccumulate
in other programming languages. It was interesting but also took up a strangley large chunk of the course.
- Course Website
- Lecture Notes:
- Functions and lists (Lecture01.lhs) (video capture)
- Definitions (Lecture02.lhs) (video capture)
- Expressions, Types and Parametric Polymorphism (Lecture03.lhs) (video capture)
- Overloading and Evaluation (Lecture04.lhs) (video capture)
- Defining functions on lists (Lecture05.lhs) (video capture)
- Sorting (Lecture06.lhs) (video capture)
- Sudoku (setting up the problem) (Lecture07.lhs) (video capture)
- Sudoku (solving it with practical efficiency) (video capture) (Lecture08.lhs)
- Proof by induction (video capture) (Lecture09.lhs)
- Left and right folds (video capture) (Lecture10.lhs)
-
Types and trees
(video capture) (Lecture11.lhs) - Some efficiency concerns (video capture) (Lecture12.lhs)
- Countdown - the setup (video capture) (Lecture13.lhs)
- Countdown - dynamic programming solutions (video capture) (Lecture14.lhs)
- Building a parser (video capture) (Lecture15.lhs)
- Monads and Sequencing (video capture) (Lecture16.lhs)
- Related courses:
- Other courses this term: [[Courses MT22]]U
Notes
- [[Notes - Functional Programming MT22, Fold fusion]]U
- [[Notes - Functional Programming MT22, Fold cheatsheet]]U
- [[Notes - Functional Programming MT22, Common functions]]U
- [[Notes - Functional Programming MT22, Duality theorems]]U
- [[Notes - Functional Programming MT22, Misc]]U
Lectures
- [[Lecture - Functional Programming MT22, I]]U
- [[Lecture - Functional Programming MT22, II]]U
- [[Lecture - Functional Programming MT22, III]]U
- …
- [[Lecture - Functional Programming MT22, V]]U
- [[Lecture - Functional Programming MT22, VI]]U
- [[Lecture - Functional Programming, MT22, VII]]U
- [[Lecture - Functional Programming, MT22, VIII]]U
- …something got messed up with the numbering…
- [[Lecture - Functional Programming MT22, XI]]U
- [[Lecture - Functional Programming MT22, XII]]U
- [[Lecture - Functional Programming MT22, XIII]]U
- [[Lecture - Functional Programming MT22, XIV]]U
- [[Lecture - Functional Programming MT22, XV]]U
- [[Lecture - Functional Programming MT22, XVI]]U
Problem Sheets
- Sheet 1
- Sheet 2, [[Problem Sheet - Functional Programming MT22, II]]?
- Sheet 3, [[Problem Sheet - Functional Programming MT22, III]]?
- Sheet 4, [[Problem Sheet - Functional Programming MT22, IV]]?
- Sheet 5, [[Problem Sheet - Functional Programming MT22, V]]?
- Sheet 6, [[Problem Sheet - Functional Programming MT22, VI]]?