We're going to use the language Haskell to train you in functional programming. It is a very nice language with many interesting concepts. A hugs interpreter for Haskell is standardly installed in our labs. You will need this book:
Simon Thompson: Haskell: The Craft of Functional Programming, Second Edition. Addison-Wesley. Publication year: 1999.You should install either hugs or GHC on your machine at home (hugs is easier to use). Hugs, GHC, and many other Haskell tools can be obtained from Haskell home:
www.haskell.orgYou can also take a look at A Tour of the Haskell Prelude. Here you can find types, descriptions, definitions, and examples of nearly all predefined functions.
| Lecture | Topics | Chapters | Exercises |
| FP1 | - Basic | 1 - 5 | 5.20, 5.22, 5.24, 5.25, 5.26 |
| FP2 |
- Patterns - Higher order functions |
6,7,9,10 |
6.2, 6.4, 6.6, 7.14, 7.18, 7.23, 9.3, 9.4, 9.5, 9.6, 9.9, 9.10, 9.13, 9.14, 9.19, 9.20, 9.21, 10.2, 10.3, 10.5, 10.9, 10.11, 10.13 |
| FP3 |
- Type system - Haskell classes - Algebraic types - Lazy programming |
12,13, 14.1 - 14.3, 17 (you can skip 17.3 - 17.5) |
12.4, 12.8, 13.2, 13.3, 13.7, 17.24 Additional exercises from small exercises pack: - section 5.2 no 2,3,7. - section 5.3 no 1,5,9. - section 13 no 1-5. - section 9 no 1,2,3. |
| FP4 |
- IO in Haskell - Performace Issue |
18,19 | 18.5, 18.6, 18.7, 18.23, 19.11 |
Note that all components are compulsory, and your final-test should be at least 4.00.
Supplementary materials
Here is a pack of additional small exercises
which you may find useful, along with
the solutions.
Some old exams: 1 (dutch), 2 (english) + solution, 3 (english) + solution.
Also take a look at last year's exam (english). The answers to the multiple choice questions are:
1a 2c 3b 4d 5b