Function composition
Combining functions so output of one becomes input to another creating new functions. Function composition enables building complex operations from simple functions.
Formula
(f ∘ g)(x) = f(g(x))
Real World
In a Unix terminal, piping commands like 'cat log.txt | grep ERROR | wc -l' mirrors function composition — each command's output feeds into the next, building a complex operation from simple ones.
Exam Focus
State the mathematical notation (f ∘ g)(x) = f(g(x)) and emphasise that g is applied first, then f — reversed order is a common error.
How well did you know this?