Organization
This course introduces students to the techniques of functional programming, the advantages and disadvantages of this programming paradigm, and its use in practice. This approach is declarative in the sense that the programmer symbolically describes the problem to be solved rather than specifying the exact sequence of operations required to solve it. It allows focusing on the essence of the solved problem and implementing even more complex algorithms compactly. Functional programming has notable advantages for parallelization and automated verification of algorithms, and the most useful functional programming concepts are increasingly often introduced to standard programming languages. Because of the focus of functional programming on symbols rather than numbers, functional programming has been heavily used in artificial intelligence fields, such as agent systems or symbolic machine learning.
The course consists of weekly lectures and labs which will be published as we go along the course.
Course outline
- Lisp/Scheme/Racket
- simple syntax (directly matches -calculus)
- dynamically typed
- code-as-data (easy to write interpreters, ...)
- allows mutable data
- -calculus
- Haskell
- pure functional language
- statically typed
- rich type system
- strictly separates the pure core from the mutable shell
Homework
You will have to solve four homework assignments (for 50 points in total):
- 2 assignments in Racket
- 2 assignments in Haskell More on the details of the homework here.
Exam
The final programming exam has 30 points. Final, optional oral exam for 20 points. More on the details of the exam here.
Grading
The grading is the standard grading scale:
A | B | C | D | E | F |
---|---|---|---|---|---|
91-100 | 81-90 | 71-80 | 61-70 | 51-60 | 0-50 |
Teachers
Name | Consulting hours | Room | Role | |
---|---|---|---|---|
Rostislav Horčík | appointment by email | xhorcik@fel.cvut.cz | KN:E-322 | Lecturer |
Niklas Heim | appointment by email | heimnikl@fel.cvut.cz | KN:E-406 | Lecturer & Instructor |
Tomáš Votroubek | appointment by email | votroto1@fel.cvut.cz | Instructor | |
Matěj Zorek | appointment by email | zorekmat@fel.cvut.cz | Instructor | |
Jiří Němeček | appointment by email | nemecj38@fel.cvut.cz | Instructor |
Other resources
Harold Abelson and Gerald Jay Sussman and Julie Sussman: Structure and Interpretation of Computer Programs, MIT Press, 1996.
R. Kent Dybvig: The Scheme Programming Language, Fourth Edition, MIT Press, 2009.
Raul Rojas: A Tutorial Introduction to the Lambda Calculus
Greg Michaelson: An Introduction to Functional Programming Through Lambda Calculus, Dover edition, 2011.
Graham Hutton: Programming in Haskell, Cambridge University Press, 2016.
Scheme/Racket:
Haskell:
- https://haskell.org/documentation/
- Real World Haskell
- Lecture: Introduction to Haskell - including lecutre notes and nice homework exercises
- Creating types
- Pattern matching
- Modules
- Functors, Applicatives, and Monads In Pictures
- Introduction to
IO
IO
inside- Monads
- Functors