Functional Programming (Winter 2024)

General Information

Lectures & Tutorials

DateTypeTopicMaterialRecordings
Tu 2024-10-15LectureIntroduction00-intro.pdf, 01-starting-haskell.pdf
Fr 2024-10-18LectureIntroductionSlidesVideo
Tu 2024-10-22LectureFunctions, Lists, Algebraic DatatypesVideo (part 1), Video (part 2)
Tu 2024-10-29LectureAlgebraic Datatypes, Higher-Order FunctionsSlides, ProgramsVideo
We 2024-10-30TutorialDiscussion of Exercise 1Video
Tu 2024-11-05LectureHigher-Order Functions, LazinessSlides, ProgramsVideo
Fr 2024-11-08TutorialDiscussion of Exercise 2Video
Tu 2024-11-12LectureType classes and IOSlides, Slides, ProgramsVideo
Fr 2024-11-15TutorialDiscussion of Exercise 3Video
Tu 2024-11-19LectureMonads and the Gen MonadSlides, ProgramsVideo
Fr 2024-11-22TutorialDiscussion of Exercise 4Video
Tu 2024-11-26LectureMonadic interpretersSlides, ProgramsVideo
Fr 2024-11-29TutorialDiscussion of Exercise 5Video
Tu 2024-12-03LectureFunctors, ApplicativesSlides, ProgramsVideo
Fr 2024-12-06TutorialDiscussion of Exercise 6Video
Tu 2024-12-10LectureMonad TransformersSlides, ProgramsVideo
Fr 2024-12-13TutorialDiscussion of Exercise 7Video
Tu 2024-12-17LectureGADTsSlides, ProgramsVideo
Fr 2024-12-20TutorialDiscussion of Exercise 8Video

Exercises

#TopicMaterial
0Installation & Basic Usage of the Haskell ToolchainPDF
1Functions, Lists, RecursionPDF, Solution
2Higher-Order FunctionsPDF, Code, Solution
3Lazy EvaluationPDF, Solution
4Type Classes & IOPDF, Solution
5QuickCheck’s Arbitrary & AVL TreesPDF, Solution
6Functors & MonadsPDF, Code, Solution
7Applicatives & ParsersPDF, Code, Solution
8Monad TransformersPDF, Code, Solution Part 1, Solution Part 2
9GADTsPDF, Code

Content

This course conveys fundamental concepts of functional programming using the programming language Haskell.

Goal

Learning objectives from the module compendium: “Development of a non-procedural view on algorithms and data structures, confident handling of higher-order functions and data, knowledge and ability to apply fundamental functional programming techniques, knowledge of advanced programming concepts, ability to develop medium-size functional programs independently.”

Topic List

  • Definition of functions, pattern matching, higher-order functions
  • Types and type classes
  • Algebraic data types
  • Functional data structures
  • Applicative parsers
  • Monads and monad transformers
  • Arrows
  • Verification of functional programs
  • Monadic I/O and stream I/O

Preliminaries

Interest in learning and applying new programming concepts and languages.

Literature

The book Programming in Haskell by Graham Hutton covers about 30% of the lecture. This book is available in the TF-library.

Stephen Diehl’s WHAT I WISH I KNEW WHEN LEARNING HASKELL

Exam

The exam will be on 2025-03-06 and will take place in the computer pools. Further information will be announced in time.

Communication

We provide a discord-like chat to allow for asynchronous questions about the lecture, exercises, and functional programming in general. You can log in there with your Ilias credentials.

Announcements will be sent via email through HisInOne. If you do not want to miss these announcements, you should register for the course in HisInOne!