Functional Programming
Functional programs are easier to develop and reason about than their imperative counterparts. This makes them an ideal vehicle for the exploration of data structures and modularisation. Even if you don't plan to use a functional language in the future, this course provides the solid foundations for algorithm design and software reuse in any programming paradigm.
Frequency
This course normally runs twice a year.
Course dates
24th February 2025 | Oxford University Department of Computer Science - Held in the Department | 0 places remaining. |
Objectives
At the end of the course, students will have seen a variety of different techniques that may be used to structure problems and their solutions. They will gain new perspectives on algorithms, data design, and functional abstraction.
Contents
- Functions:
- base types; tuples; program structure: selection and recursion; ad-hoc and parametric polymorphism.
- Evaluation:
- reduction strategies; order of evaluation; lazy versus eager and strict versus non-strict.
- Lists:
- pattern matching; recursion over lists; proof by induction; folds and accumulation.
- Higher-order features:
- function application and composition; type inference; currying; higher-order functions.
- Data structures:
- recursion patterns; trees; arrays; sets; dictionaries.
Assessment criteria
The assignment is intended to determine, in order of decreasing importance:
- have you understood the fundamental tools of functional programming: algebraic data types, pattern matching, higher-order functions, parametric polymorphism, and lazy evaluation?
- have you demonstrated an ability to apply these fundamental tools and accompanying techniques to a particular case study?
- do you have the ability to present clear arguments supporting design decisions and discussing trade-offs, concisely and precisely?
- how fluent is your expression in Haskell, and how elegant is the resulting code?
Requirements
The course assumes some familiarity with discrete mathematics: Software engineering mathematics would be a suitable preparation.