Chapter 8
Functions
One of the core concepts in IT is abstraction (§4.3). This chapter introduces one of the most basic forms of abstraction; the function.
A variable is a label that allows us to refer to data in our program, a function is a label that allows us to refer to one or more program statements in our program. As with variables we use the names of functions to make it clear what the enclosed statements do.
Functions have another neat trick, we can pass data to the function for it to act on (and get information back).