CS410 – Advanced Functional Programming

Credits 20
Level 4
Prerequisites CS316 Functional Programming
Semester 1
Elective No
Contact Lectures: 20 | Tutorials: 10 | Labs: 20
Assignments: 65 | Self study: 85
Assessment 100% by coursework, consisting of regular programming exercises and a small individual project, building a portfolio of work for assessment.
Lecturer Dr Fredrik Nordvall Forsberg

Aims and Objectives

To provide the student with further skills in functional programming and an appreciation of the mathematical structures which underpin powerful general programming concepts and techniques.

Learning Outcomes

On completion of the class, a student should be able

  • to understand the advantages of high-level programming languages;
  • to understand the advantages of using mathematics to structure programming;
  • to understand the principles of functional program design and demonstrate their practical application;
  • to design and implement significant software systems, e.g. those arising in fourth year projects.


Understanding the mathematical structures arising in advanced functional programs as mediated by the following concepts: type classes and constructor classes, monoids, functors, applicative functors, monads and monad transformers, arrows, comonads, inductive and coinductive types, recursion patterns including folds and unfolds, continuations, and generalised algebraic data types.

Using these concepts to achieve the following features of code: abstraction, code reuse, type guarantees of validity and safety, data structures equipped with mathematical structure.

Applying the ideas learned in the course to specific programming problems, possibly including the following: interactive processes, input/output, environment handling and modular interpreters, zippers, parsers, type checkers, graphical user interfaces, and transaction processing.

For the most part, the class will be mediated in Haskell, but other functional programming languages may be explored. Advanced material may involve the categorical background to the functor class hierarchy, or the basics of functional programming with dependent types.

Indicative 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.

As well as standard introductory textbooks, such as Thompson’s “The Craft of Functional Programming” and Hutton’s “Programming in Haskell”, more advanced and practical texts such as “Real World Haskell” by Goerzen, O’Sullivan, and Stewart will prove valuable.

Relevant online resources include the Haskell wikibook, “Learn You a Haskell for Great Good!” and weblogs such as “A Neighborhood of Infinity”. Some research papers, especially ‘Functional Pearls’, may also make a contribution.