Course syllabus

Quick Links:

Lectures Exercises Lab 1 Lab 2Lab 3Lab 4 Lab 5FireSlack Schedule


Slides from Final Summary

Past kahoot quizzes

Past Exams


Course-PM

 TDA452 / DIT143 Functional programming lp2 HT24 (7.5 hp)

The course is offered by the Department of Computer Science and Engineering

Contact details [Slack]

Teaching Assistants: 

Course Representatives

Course purpose

In this course, you will learn about functional programming through the Haskell programming language. Concrete topics encountered in the course include:

  • functions as first-class values
  • data structures (lists, tuples, user-defined data types)
  • recursion and recursive data types
  • polymorphism and type classes
  • pure functions vs input-output
  • modules and abstract data types
  • testing functional programs
  • lazy evaluations and infinite objects
  • introduction to monads

Schedule

Lectures are pre-recorded. The scheduled meeting times are referred to as Class meetings (still called "lectures" in TimeEdit)

Week 1: Intro meeting on Monday 15:15,  regular class meeting on Tuesday 15:15 and Thursday at 10:00.
Week 2 & on, class meetings are on Mondays (13.15) and Thursdays (10.00).

In addition, we have scheduled lab supervision hours were you can either meet a TA over zoom (from week 2) or in one of the computer rooms (from week 4).

  • From week 2 onward:  15:15-17 on Mondays and Wednesdays via zoom: send a link to your room in  #lab-supervision on Slack
  • From week 4 onwards you may also ask questions at those times in person in the scheduled room.  Please use #lab-supervision to join the queue for help either way.

Course literature

There is no mandatory literature for this course.  The following links are a sample of potentially useful resources: 

  • Slides and other material from the pre-recorded lectures
  • Video lectures
  • Book: Programming in Haskell by Graham Hutton
    • 2nd edition of a compact and well-written Haskell book that is a good fit for this course. 
  • Book: Learn You a Haskell for Great Good! (Links to an external site.) (freely available online).
  • Real World Haskell by Bryan O'Sullivan, Don Stewart, and John Goerzen (freely available online).
    • This is more advanced and more oriented toward practical Haskell programming. A good book to have on the shelf if you continue with Haskell. This is the course book for the Advanced Functional Programming course.

Course design

Teaching is through pre-recorded lectures and self-study exercises, supported by online meetings related to the most recent lecture.  Class meetings are given two times a week. 

There are four programming labs which are done in groups of two.  Some of the labs are divided into two parts, so there are hand-in deadlines most study weeks.  The final lab is a choice between an own mini project or a more conventional lab.   Conventional labs are graded electronically; if a lab is not passed then students get multiple chances to resubmit until the given final deadline.  Those who choose to do a project for the final lab will give an oral presentation of the lab (usually over zoom). 

The lab submission is through the Fire system (see links from the labs).

Changes made since the last occasion

The last lab (from 2023) will be replaced by 2 smaller labs.  Material on GUIs will nolonger be used.

Learning objectives and syllabus

Learning objectives:

- write small to medium-sized functional programs for a variety of applications;
- exploit a variety of programming techniques typical in functional programming, such as: use of recursion, modelling with recursive datatypes, abstraction and reuse with the help of higher order functions and monads;
- appreciate the strengths and possible weaknesses of the functional programming paradigm.

Link to the syllabus Chalmers.
Link to the syllabus GU.

Link to the study plan

Examination form

The examination of the course has two parts:

  • Weekly assignments ("labs"), done in groups of 2 students.
  • An individual written exam after the end of the course (in January). The re-exam is given in April.
    Exam dates, once decided, are given on the student portal  (search: TDA452 - the exam time is the same for GU students) https://www.student.chalmers.se/sp/examdates_list
  • Exam times below give an indication only. For the definitive list please see the link above.
    TDA452 Functional programming 
    Module: 0211
    Tue 14 Jan 2025 2.00 pm Johanneberg 4 hours 14 Oct 2024 18 Dec 2024
    TDA452 Functional programming 
    Module: 0211
    Tue 15 Apr 2025 2.00 pm Johanneberg 4 hours 03 Mar 2025 30 Mar 2025
  • Remember that you have to sign up for the exam ahead of time!

To pass the course it is necessary to pass all assignments and the written exam. Your final grade is determined by your grade on the written exam only.

Written Exam

The exam is written using the Inspera electronic exam system.  See the slides from the intro lecture for more information.

The grades awarded on the exam are 3, 4, 5 for Chalmers students, and G, VG for GU students. (G on the GU side corresponds to 3 or 4 on the Chalmers side; VG corresponds to a 5.)

A sample of old exams is available. Note that the exam includes a list of useful functions.  The only other permitted materials are a dictionary. 

Lab Assignments

In the table below you will find links to lab assignments that have to be handed in.

  • Each assignment has a submission deadline at which you must submit your solutions. Your first submission is expected to be a serious attempt to complete the lab.
  • If your submission does not pass (it's incorrect or simply badly coded) then you must resubmit. You can resubmit several times if need be, until the cutoff deadline.
  • The cutoff deadline is absolute: it is the last possible date to hand in your solutions. If your solutions are not passed you get no further chances this term.
  • If you want to do a project instead of labs 4 and 5 then please contact Dave at the beginning of January with your proposal. If you are approved for a project then this is handed in via fire with the same deadline as lab 5 and graded orally (over zoom) later that week by arrangement.
Lab Part Submission deadline Cutoff deadline
Lab 1 Wednesday, Week 1
(2024-11-06)
Friday, Week 2
(2024-11-15)
Lab 2 A Wednesday, Week 2
(2024-11-13)
Friday, Week 4
(2024-11-29)
B Wednesday, Week 3
(2024-11-20)
Lab 3 A Wednesday, Week 4
(2024-11-27)
Friday, Week 6
(2024-12-13)
B Wednesday, Week 5
(2024-12-04)
Lab 4 Wednesday, Week 6
(2024-12-11)
Friday, Week 7
(2024-12-20)
Lab 5 Wednesday, Week 7
(2024-12-18)

 

2024-01-10

 

Course summary:

Date Details Due