CS316 – Functional Programming

Credits 20
Level 3
Semester 1
Prerequisites Basic programming skills, as might be gained by taking CS105 Programming Foundations or a similar introductory programming class.
Availability Possible elective
Contact Lectures: 22 | Tutorials: 11 | Labs: 22
Assignments: 65 | Self study: 80
Assessment The class will be assessed 70% by a two-hour exam and 30% by coursework.
There will be 11 weekly assignments consisting of programming problems designed to reinforce material covered in recent lectures. Coursework will be assessed individually. Each of the 11 assignments will count equally. The hand-in will be a Haskell script containing solutions to the programming problem set and comments where appropriate.
In addition, the class will involve substantial project work, to promote a more effective synthesis of the material and put the skills acquired to practical effect. All students will take a 2-hour exam which will require the selection and deployment of appropriate techniques from across the syllabus.
Resit The resit for the class will take the form of a two-hour examination. The resit examination will have the same format as the original examination. The mark returned for the resit attempt will be based on the resit examination alone.
Lecturer Dr Robert Atkey

General Aims

To provide the student with skills in basic functional programming and experience in integrated deployment of those skills.

Learning Outcomes

On completion of the class, a student should be able:

  • To understand the basic advantages of high-level programming languages.
  • To understand the basic advantages of using mathematics to structure programming.
  • To understand the basic principles of functional program design and demonstrate their practical application.
  • To specify and implement simple functional programs in the programming language Haskell.
  • To integrate the basic techniques of functional programming in a substantial project.


Core topics in the Haskell programming language are: Basic functions; Haskell’s built in data types; if expressions; case expressions; guarded functions; local definitions; pattern matching; list processing with built-in functions; recursion; polymorphism; anonymous functions; first-class functions; algebraic data types including recursive and polymorphic such types; standard type classes; monadic-style input/output. The course will conclude with substantial integrative project work (e.g. a lexer-parser-interpreter and/or turtle graphics).

Recommended Text/Reading*

* This list is indicative only – the class lecturer may recommend alternative reading material. Please do not purchase any of the reading material listed below until you have confirmed with the class lecturer that it will be used for this class.

Programming in Haskell. Graham Hutton. Cambridge University Press, 2007, ISBN-13: 9780521692694 | Stocked at Amazon (Other retailers are available)