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.
Course dates
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.
Requirements
The course assumes some familiarity with discrete mathematics: Software engineering mathematics would be a suitable preparation.