Functions

Progressively implementing nested functions.