Informatics 1 – Functional Programming
Contents
- People
- Course description
- Schedule
- Examination
- Programming competition
- Course resources
- Other resources & external links
1. People
Lecturer: |
Philip Wadler |
|
Teaching Assistant: |
Willem Heijltjes |
<w.b.heijltjes | @ | sms.ed.ac.uk> |
|

2. Course description
The course teaches the basics of functional programming using the language Haskell. The main goal is to acquaint the student with fundamental programming concepts such as recursion, abstraction, higher-order functions and data types, whilst at the same time emphasizing the practical use of such constructs by applying them within a graphical environment.

3. Schedule
The course comprises 20 lectures and 9 tutorials, spread over the eleven weeks of the semester. There is also the drop-in lab: special times at which the computer room in Appleton Tower is staffed by demonstrators, who are ready to help out with any questions on the course material. Lecture notes, tutorial exercises and solutions will be made available here on a weekly basis.
Lectures
Lectures are on Mondays and Tuesdays, starting
week 2, except the very first lecture which is on Friday 25 September, 2-2:50pm, Lecture Theatre 5. There is no lecture on Monday 28 September.
- Mondays, 2:00–2:50pm, Appleton Tower, Lecture Theatre 5
- Tuesdays, 11:10–12:00am, Appleton Tower, Lecture Theatre 5
See also the
semester 1 timetable
for Informatics 1.
Drop-in lab
At these times lab demonstrators will be available to assist with the coursework. Drop-in lab is held daily at computer lab West on level 5 of Appleton Tower.
| | | |
| Mondays | 3–5pm |
| Tuesdays | 2–5pm |
| Wednesdays | 2–5pm |
| Thursdays | 2–5pm |
| Fridays | 3–5pm |
Tutorials
Tutorial groups with their times and places can be found
here.
Tutorials are held in groups of 10–12, on Thursdays and Fridays,
starting in week 3. Students are expected to prepare for each
tutorial, which includes completing the exercises and reading the
appropriate chapters in the textbook.
Tutorial exercises will be posted in the table below,
and are due at the tutorial of the same week—for instance, the
exercises of week 3 will be discussed during the tutorials on Thursday 8
and Friday 9 October. Exercises will be made available at least a week
before they're due.
Schedule
Week |
Subject |
Lecture notes |
Reading assignment |
Tutorial exercises |
Solutions |
|
|
|
|
|
|
|
|
1. |
21–25 Sept |
Systems Intro |
lect00.pdf
|
|
|
*Tutorials start in week 3* |
2. |
28 Sept–2 Oct |
Lab Week |
lect01.pdf
lect02.pdf
lect02a.hs
lect02b.hs
|
1–3 |
(pp. 1–52) |
labweek.zip
(Windows)
|
solutions
|
3. |
5–9 Oct |
Lists and Recursion |
lect03.pdf
lect03.hs
|
4, 5 & 7 |
(pp. 53–95, 115–134) |
tutorial1.zip
|
solutions
|
4. |
12–16 Oct |
More fun with recursion |
lect05.pdf
lect05.hs
|
6 & 8 |
(pp. 96–114, 135–151) |
tutorial2.zip
|
solutions
|
5. |
19–23 Oct |
Map, Filter, Fold, Sections, Binding |
lect07.pdf
|
9–11 |
(pp. 152–209) |
tutorial3.zip
|
solutions
|
6. |
26–30 Oct |
Binding, lambda calculus & formal proof |
*Class Test*
lect09.pdf
|
|
|
tutorial4.zip
|
solutions
|
7. |
2–6 Nov |
Algebraic data types |
lect11.pdf
lect11.hs
|
12–14 |
(pp. 210–279) |
tutorial5.zip
|
solutions
|
8. |
9–13 Nov |
Abstract types, type classes |
lect13.pdf
SetList.hs
SetTree.hs
MainList.hs
MainTree.hs
|
15 & 16 |
(pp. 280–336) |
tutorial6.zip
|
solutions
|
9. |
16–20 Nov |
Parsers & combinators |
*Mock exam*
lect15-code.zip
|
17–19 |
(pp. 337–435) |
tutorial7.zip
(windows)
|
solutions
|
10. |
23–27 Nov |
IO and Monads |
lect17.pdf
lect17-code.zip
|
|
|
tutorial8.zip
|
solutions
|
11. |
30 Nov–4 Dec |
Hamming, Curry–Howard |
lect19.pdf
lect20.pdf
hamming.pdf
|
|
|
|
|
12. |
7–11 Dec |
Exam Week 1 |
*Final exams* |
|
|
|
|
13. |
14–18 Dec |
Exam Week 2 |
|
|
|
|
|

4. Examination
Examination is done through two tests. The first, the class test, is a hand-written exam held on October 26th in place of the lecture (at the same time and place). The second, the final exam, is a programming test held in the computer labs, scheduled for the examination weeks at the end of the semester. The class test contributes 10% towards the final mark, the final exam contributes 90%.
Notes
- The mock exam, which was previously announced for week 10, is now held in week 9.
- The final exam will be held in two sessions, one in the morning and one in the afternoon, each with a different set of questions.
- The final exam is open-book, which means you can use the textbook and your personal notes during the exam. A list of common library functions will still be provided. Also, the
online reference guide at ZVON
will be made available on your computer.
- The class test is closed-book, i.e. you are not allowed to use the textbook or your personal notes. This does not mean you have to memorize the prelude: a summary of the library functions that you might need will be provided.
- To help practice for the exam there is also a mock exam, currently scheduled for week 9 of the semester.
- Previous exams and solutions can be found below.
- Tutorial exercises are compulsory, but will not count towards the final mark.

5. Programming Competition
Each year the course is concluded with a thrilling programming competition, with an actual prize draw and first prize. The competition usually centers round the drawing of fractal-based images. This provides students with an excellent opportunity to show off the skills they have learned during the course, and to set loose their creativity in an unconstrained environment. Every year students have gone on to amaze the course organizers—and themselves—with ingenious and beautiful drawings and fractals, and this year is certainly not going to be different.
This year's entries and winners can be found here.
Previous programming competition entries:

6. Course resources
Textbook
-
Haskell: The Craft of Functional Programming, Second Edition.
Simon Thompson. Addison-Wesley, 1999.
Lectures on video
The lectures will be captured on video and made available
here.
Previous exams
- Mid-semester class exams:
- Previous final exams and resit papers:
Last year's webpage
Last year's webpage can be found
here (note that some links will not work).
Questions & Answers
See the newsgroup or the wiki.

7. Other resources & external links
- Alternative textbooks:
All of these books were also written for beginning students, and may
provide a useful alternative perspective.
- Online material on Haskell:
- Real World Haskell by O'Sullivan, Stewart and Goerzen.
This is an introductory textbook with a practical angle of approach, fully available online.
- A Gentle Introduction to Haskell by Hudak et. al.
It would be good idea for everybody to print out a copy of this
and bring it with you to tutorials/demonstrations as a
reference.
- Two Dozen Short Lessons in Haskell by Rex Page.
This book is available in PostScript and PDF format. To read the
PostScript version outside of the University labs, you may need
to install additional software.
If you can't get a hold of the official textbook, then this one
may be of some help.
- Learn You a Haskell for Great Good by Miran Lipovaca.
An easy introductory web page with lots of examples.
- The
Haskell Reference at ZVON
by Miloslav Nic.
This site is a friendly version of the Haskell Report. It contains
information about all of Haskell's predefined funcions like
drop, take, ord, chr, sum and length. Good
reference website.
- A Tour of the Haskell Standard Prelude
by Bernie Pope and Arjan van IJzendoorn.
Another good introduction to Haskell's predefined functions.
- Video lectures
from Microsoft on Haskell.
- Lecture Notes
and
Exercises
of John Hughes' Introductory Course on Haskell. (See also the old exams at the bottom of the exercises page.)
- www.haskell.org
This site has everything you could possibly want to know about
Haskell, and more! From "A Short Introduction to Haskell" and the
aforementioned "A Gentle Introduction to Haskell" to the
definition of the language, a list of books on the subject, links
to conferences/workshops, and various libraries.
- Online material on pair programming:
- Teaching Assistant
Please feel free to email the teaching assistant
with any questions you may have concerning Haskell.
- Lecturer
If after consulting all the above resources, you still can't find an answer to your question or
just want to know even more, please email the lecturer.
