Introduction to Functional Programming – Programming AssignmentsTDA555 / DIT440, LP1 2016
Home | Schedule | Labs | Lectures | Exercises | Exam | About | FAQFire | Forum | TimeEdit | YouTube | Links
Introduction to Functional Programming – Programming AssignmentsTDA555 / DIT440, LP1 2016
Home | Schedule | Labs | Lectures | Exercises | Exam | About | FAQFire | Forum | TimeEdit | YouTube | Links
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, but graded orally by showing 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: The Power Function

Lab 2: BlackJack (2 parts)

Lab 3: Sudoku (2 parts)

Lab 4: Drawing Functions (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.

The Fire system

Lab Grading

For Lab 1, once you have submitted please find a lab assistant during the lab supervision times (see below) to whom you can explain your lab solution.

For labs 2 and 3 we will have a fixed time for presentation of solutions: Mondays 16-18 after the exercises (from week 3 onwards). [More details to follow]

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 Tuesdays, Wednesdays, Thursdays and Fridays. There are no lab supervision times on Mondays. 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: We have added one or two additional rooms due to overcrowding in the computer rooms. If you have your own computer you can sit in one of those rooms instead. To make it easier for the assistants to help you, please use the electronic waiting-list.

The course assistants' lab supervision schedule

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

You have 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.
Book a slot here for weeks 3 and 4.
Book a slot here for weeks 5 and 6.

To book a workplace for you and your lab partner(s), put your names in one square to book a workplace. Note that

Fairness rules:


Each lab (except the first one) 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.

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.


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.