Introduction to Functional Programming – Programming AssignmentsTDA555 / DIT440, LP1 2017
Home | Schedule | Labs | Lectures | Exercises | Exam | About | FAQFire | WaitList | Group | TimeEdit | YouTube | Links
Introduction to Functional Programming – Programming AssignmentsTDA555 / DIT440, LP1 2017
Home | Schedule | Labs | Lectures | Exercises | Exam | About | FAQFire | WaitList | Group | TimeEdit | YouTube | Links
Some changes are underway for the labs in 2017. Instructions will be updated as needed.

There are 4 programming (lab) assignments in total. You have to pass all these to get a pass on the course. Labs are submitted in an electronic system. Lab 1 is graded offline, but labs 2-4 are graded by explaining your lab to the course assistants.

You are required to work in groups of 3. To keep things simple we ask you to use the same groups assigned in the intro course in weeks -1 and 0. Those of you who did not attend the intro course will need to find each other! The google group is useful for this. If you want to use the latest GHC version on the student computers (not required), please follow these instructions.

Lab 1: Chessboard

Lab 2: Blackjack (2017 version) (2 parts)

Lab 3: Tetris (2017) (2 parts)

Lab 4: Calculator (2017) (2 parts)

The Fire System

All lab assignments must be submitted using an electronic submission system called "Fire".

Remember to register both yourself and your lab partners in a lab group before you submit! By default, the submission system does not accept submissions made by single persons, and lab 2 and onwards requires you to submit as a group of 3 unless you have been granted an exception.

The Fire system

Lab Grading

For Lab 1, once you have submitted you will hear back from us via the fire system.

For labs 2 - 4 we will have a fixed time for presentation of solutions: Mondays 16-18 after the exercises (from week 3 onwards) and Tuesdays 10-12. Each grader will have a booking sheet in which you must book your slot. Further details and booking information here

When grading labs all members of the group must be present, and are required to understand all of the code submitted, and it is the resposibility of all of the group members to make sure that this is the case. If one of the group members clearly does not understand the code then the group will not be passed, and will be expected to try again when all members of the group are able to explain the solution.

Lab Supervision

Supervision is scheduled at various times and places on Wednesdays, Thursdays and Fridays. There are no lab supervision times on Mondays or Tuesdays (just times for presentation of your solutions to the graders). See the timeEdit schedule.

Note: These times are not obligatory! The idea is that all of you will spread out over the week. You cannot come all at once anyway to get lab supervision, but once or twice a week should be possible. You can also work at home on your own computer on the labs (but then you will not get any lab supervision).

UPDATE: If we run out of space then you can always work nearby with a laptop and come to one of the rooms when you get stuck. To make it easier for the assistants to help you, please use the electronic waiting-list.

You are encouraged to bring pen and paper to the lab sessions, as that makes it convenient for the supervisors to explain certain things.

Booking a work place at the Lab Supervisions

As things tend to be a bit crowded at the beginning of term, we ask you to book a place in a scheduled lab supervision slot before you come to a lab room.

Book a slot here for weeks 1 and 2.

To book a workplace for you and your lab partner(s), put all your names in one square to book a workplace. Note that the unusual early slot thurs 2017-09-07 8-10.00 there are only 28 workstations, not 41.

Fairness rules:


(TO be updated for 2017) Lab 3 on onwards has three deadlines. We will arrange a time and place where you can demonstrate and explain your lab. If we are happy that the code is good and that all group members are able to explain any part of it then we will pass you. Otherwise you need to resubmit with changes (if necessary) or when you are ready to re-present the lab.

First deadline:

Second deadline (one week later):

Final deadline (1.5 weeks after second deadline):

Submitting after a deadline is in principle unacceptable. It is much better to submit what you have before the deadline, even if you are not happy with it. If you have a good reason for an extension – contact us before the deadline, not afterwards.

If you do miss a deadline, you may get a new chance at the end of the course. Otherwise, there is always a new opportunity to finish the labs next year, according to the instructions for that year.


Cheating on labs is unacceptable. Cheating means:

On the other hand, it is fully allowed to orally discuss assignments and solutions. The web forum can be used for general and specific questions, but of course not for posting parts of solutions.

If you have problems, you should talk to us instead of copying from others. If needed, you may get more time and more help. If this is not enough, it is advisable to redo the course next year. This option makes much more sense than cheating.

Some cheating can be detected by the lab graders, when they discover similar solutions (e.g. same code, but different comments, layout, variable names, etc.). At the end of the course, we will also use automatic software that checks for similarity between all submitted solutions.

This is what happens if we suspect cheating:

But hopefully, this is not going to happen.

Use of external libraries

In priciple, the only external modules you are allowed to use in the labs are:

Of course, there may be exceptions. For example, the module Text.Show.Functions is needed to test higher-order functions with QuickCheck, and Text.XHtml is used in an extra assignment in lab 1.

You are encouraged to look around on Hackage and experiment with external libraries after you have solved the assignments. But keep in mind that the graders may not have those libraries installed, so don't use non-standard modules in the files you submit.