Functional Programming Paradigm
Aligned to the AQA 7517 specification
- Level
- Advanced
- Reading time
- 5 min
- Published
- 13 June 2026
- Updated
- 1 July 2026
On this page
Key takeaways
- In functional programming a function is a mathematical mapping f : A → B, where A is the domain (input type) and B is the co-domain (output type).
- Functions are first-class objects: they can be assigned to variables, passed as arguments, returned from functions, and stored in data structures.
- Partial function application applies a function to fewer arguments than it expects, returning a new function for the remaining arguments; the type arrow is right-associative.
- Function composition g ∘ f requires the co-domain of f to equal the domain of g, and (g ∘ f)(x) = g(f(x)) so f is applied first.
- Multi-argument functions are applied one argument at a time (currying), so add 3 4 means (add 3) 4.
Something not quite clicking?
Ask Aica to explain any part of this differently. Free, takes 30 seconds.
Key terms
- Function (as a mapping)
- A mathematical mapping from an input set (domain) to an output set (co-domain), written f : A → B.
- Domain
- The set of all valid inputs to a function, that is its input type.
- Co-domain
- The set of all possible outputs of a function, that is its output type.
- First-class object
- A value, such as a function, that can be assigned to a variable, passed as an argument, returned, or stored in a data structure.
- Function application
- The act of applying a function to its argument(s), producing a value.
- Currying
- Applying a multi-argument function one argument at a time, so add 3 4 is evaluated as (add 3) 4.
- Partial function application
- Applying a function to fewer arguments than it expects, producing a new function that takes the remaining arguments.
- Function composition
- Combining two functions into one that applies them in sequence, where (g ∘ f)(x) = g(f(x)).
Frequently asked questions
For a function f : A → B, the domain A is the input type (the set of valid inputs) and the co-domain B is the output type (the set of possible outputs). Swapping them in the type notation is a common error.
Partial function application applies a function to fewer arguments than it expects, producing a new function that takes the remaining arguments. For example add 4 returns a function that adds 4 to any integer, which can then be passed to map.
f runs first, then g, because (g ∘ f)(x) = g(f(x)). Although g is written first when reading left to right, the rightmost function in the composition chain is applied first. The co-domain of f must equal the domain of g.
Generate revision on any topic you study
Type any topic you're studying and Aicademy generates a complete lesson, quiz, and flashcard set, personalised to your level.
Lessons on anything
Structured, level-matched lessons on any topic you study
Practice quizzes
Find out what you actually know before the exam does
Flashcard sets
Lock in key concepts with instant revision cards
Ask Aica
Stuck on something? Get a clear explanation, any time
Big Data
Functional Programming in Practice
Related lessons
5 min
6 min