Functional Programming


Lecture Prof. Dr. Peter Thiemann thiemann@info...
ExerciseGabriel Radanneradanne@info...


2019-04-24Github page
2019-04-20Homepage online
2019-07-03Project available

Lecture Materials

2019042401-starting-haskell.pdfExamples (after lecture)FPLecture01.mov 720p
20190429 02-haskell-functions.pdf
20190429 03-haskell-types.pdf Examples (after lecture) FPLecture02.mov 720p
20190508 04-define-types.pdf Examples (after lecture)
20190508 05-more-about-lists.pdf.pdf Examples (after lecture)
20190513 06-higher-order.pdf Examples (after lecture) FPLecture06.mov 720p
20190515 07-laziness.pdf Examples (after lecture) FPLecture07.mov 720p
20190520 08-type-classes.pdf Examples (after lecture)
20190520Functional data-structures Examples (after lecture)
20190527Functional data-structures (heaps, real-time queues) FPLecture10.mov 720p
20190529 10-io.pdf Examples (after lecture)
20190603Functors and Applicatives 11-functors-applicatives.pdf Examples (after lecture) FPLecture12.mov 720p
20190605Functors, Applicatives 11-functors-applicatives.pdf Examples (after lecture) FPLecture13.mov 720p
20190617Parsing with Combinators 11-functors-applicatives.pdf Examples no recording available (technical problems), but see recordings for 20171122, 20171127, 20171129 in the 2017 lecture.
20190619Interpretation and monads 12-monadic-interpreter.pdf Examples (after lecture) FPLecture14.mov 720p
20190624Interpretation and monads (cont'd) 12-monadic-interpreter.pdf Examples (after lecture) Examples (after lecture) FPLecture15.mov 720p
20190626Composition and monad transformers 13-monad-transformers.pdf Examples FPLecture16.mov 720p
20190701Modular monadic interpreters Lecture Material FPLecture17.mov 720p
20190703Generalized algebraic datatypes (GADTs) 14-gadt.pdf Lecture Material FPLecture18.mov 720p
20190708GADTs (cont'd), Lambda Calculus 15-lambda-calculus.pdf Material GADTs, examples lambda calculus FPLecture19.mov gadt 720p, FPLecture20.mov lambda 720p
20190710Lambda Calculus (cont'd) 15-lambda-calculus.pdf examples lambda calculus FPLecture21.mov lambda 720p
20190715Lambda Calculus (cont'd) 15-lambda-calculus.pdf examples lambda calculus FPLecture22.mov lambda 720p
20190717Applied Lambda Calculus and Typing 16-evaluation-strategies.pdf examples lambda calculus FPLecture23.mov lambda 720p
20190722Mini-ML and Polymorphic Typing 17-polymorphic-types.pdf soundness of type inference FPLecture24.mov 720p

Note: "Recordings" are unedited screen recordings of the lecture.


Date of issueExercise SessionSolutions
2019-05-062019-05-06 Exercise 0 (Installation)
2019-05-062019-05-06 Exercise 1 (First steps)
2019-05-062019-05-22 Exercise 2 (Recursion, Datatypes) Tracks.hs Exercise2.hs
2019-05-192019-05-29 Exercise 3 (Datatypes, Typeclasses) Exercise3.hs Pics.hs
2019-05-292019-06-05 Exercise 4 (High order functions, Functional data structures) Exercise4.hs Trie.hs TrieMap.hs
2019-06-052019-06-19 Exercise 5 (IO, Parser Combinators) ParserCon.hs MiniWhile.hs Numbers.hs StackCalc.hs
2019-06-182019-06-26 Exercise 6 (State Monad) Exercise6.hs
2019-06-232019-07-03 Exercise 7 (Monad Transformers) Logging.hs Protected.hs
2019-07-102019-07-17 Exercise 8 (GADTs) StackGadt.hs


The goal of the project is to create a program to parse, evaluate and draw L-systems in Haskell. The project should be done by groups of 2. You can find the description here.

Some example programs can found here.


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


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


Interest in learning and applying new programming concepts and languages.


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




LectureMo 14-16 ctGeb. 51 - SR 03-026
We 14-15 ctGeb. 51 - SR 03-026
ExerciseWe 15-16 ctGeb. 51 - SR 03-026

Modality of exercise

Exercise sheets are added to the website one week in advance. Exercises are not graded, but solutions may be submitted. If you want to check your work, you are of course welcome to ask during the exercise sessions or by email. Solutions will be discussed during the exercise session.


The exam will be a written exam (closed book). We strive to conduct the exam on the computer. During the exam you will have access to the solutions you submitted for the exercises.


Announcement will be posted on this page under the rubric News. Urgent announcements will also be sent via email through HisInOne. If you do not want to miss these announcements, you should register for the course in HisInOne!