August 2018
Intermediate to advanced
380 pages
10h 2m
English
So what are functions? We can define them as parameterized, named chunks of code. This means that they are chunks of code that can be called from any other part of the program by their name. Parameterized means that you can call them with certain arguments. Different calls executed with different parameters usually lead to different results.
What is the motivation behind functions? The answer is the basic principle of engineering – abstract away that which repeats itself. In Chapter 1, The Declarative Programming Style, we saw something similar in the case of loops. However, loops are built-in control structures. This means they are defined at the language level. When we need to define some logic on the language-user ...