Programming Fundamentals 3
University of Luxembourg
Bachelor in Computer Science (BiCS)
Semester 3, 2025/2026
Introduction to functional programming in Haskell
Course content
The course runs over 14 weeks and combines weekly two-hour lectures with two-hour practical sessions focused on hands-on exercises and applied training.
- Week 01: Intro to FP and Haskell Slides week 01 [GH chapters 1-5, ML chapters 1-4]
- Week 02: Basic concepts Slides week 02 [GH chapters 1-5, ML chapters 1-4]
- Week 03: Recursion Slides week 03 [GH chapter 6, ML chapter 5]
- Week 04: Functions (pointfree, composition, lambdas) and higher-order Slides week 04 [GH chapter 7, ML chapter 6]
- Week 05: Declaring types and typeclasses Slides week 05 [GH chapter 8, ML chapter 8]
- Week 06: IO Slides week 06 [GH chapter 10, ML chapter 9]
- Week 07: Code challenge Slides week 07
- Week 08: Binary Search Trees Slides week 08
- Week 09: Midterm exam Download
- Week 10: AVL trees (part 1) Slides week 10 [BW]
- Week 11: AVL trees (part 2) Slides week 11 [BW]
- Week 12: Functors, applicative functors and monads Slides week 12 [GH chapter 12, ML chapters 11-12]
- Week 13: State monad Slides week 13 [GH chapter 12, section 12.3]
- Week 14: Inductive view of graphs Slides week 14 [ME]
Info
The slides for each class were written in Jupyter Notebooks using the IHaskell kernel. Most of the Haskell code was developed live during class. Please kindly report any bugs you find.
Assessment methods
- Homework assignment with programming problems (30%) Download
- Midterm written exam (30%) Download
- Final written exam (40%) Download
Homework assignments from previous editions:
- (2024/2025) Homework 1, Homework 2, Homework 3, Homework 4
Expected learning outcomes
At the end of the course the student will:
- Know how to program and reason about programs in a purely functional programming style.
- Solve problems in Haskell in a concise, yet expressive, manner.
- Decompose complex problems into smaller, manageable subproblems.
- Think recursively, make use of higher-order functions, understand the benefits of type systems, and learn how some programming languages like Haskell avoid unnecessary computations via lazy evaluation.
- Know common data structures (like stacks, queues, trees, self-balancing trees, and graphs) and how these can be implemented in a functional language with data immutability.
- Know how to analyze the run-time complexity of operations on these data structures.
- Understand advanced concepts and abstractions of functional programming such as functors, applicative functors, and monads.
- Understand how to approach and solve classic computer science problems in Haskell with essential techniques such as recursion, permutation generation, brute-force and binary search.
Recommended literature
Programming in Haskell by Graham Hutton is the primary textbook for the course, offering a rigorous and academic introduction to functional programming with Haskell. The second book, Learn You a Haskell for Great Good! by Miran Lipovaca, covers many of the same topics with a more practical, learn-by-example approach. The last two references are used to support specific lecture topics. Each lecture listed above includes references to the relevant chapters in these supplementary materials.
- GH Programming in Haskell, 2nd Edition, by Graham Hutton. September 2016, Cambridge University Press, ISBN-13 978-1316626221. Available for free to University of Luxembourg students
- ML Learn You a Haskell for Great Good!, by Miran Lipovaca. April 2011, No Starch Press, ISBN-13 978-1593272838.
- BW Introduction to Functional Programming, by Richard Bird and Philip Wadler, 1988, Prentice Hall.
- ME Inductive Graphs and Functional Graph Algorithms, by Martin Erwig, Journal of Functional Programming 2001.