Functions & Programming Concepts · Level 2 of 5
Composition
Combining functions by using one function's output as another's input.
The intermediate output must fit the next function's domain.
Example
A number is squared and then its result is incremented.
Listen to the definition and example
Audio transcript
Composition. Combining functions by using one function's output as another's input. The intermediate output must fit the next function's domain. For example: A number is squared and then its result is incremented.
Explore this concept
Why it matters
This helps you distinguish a computation’s contract, inputs, outputs, and behavior.
Start with
Related concepts
Quick recall question
Try answering before looking back at the definition.