- What is an immutable function?
An immutable function is a function that doesn't change its argument values or the state of the program.
- How do you write an immutable function?
If you want the compiler to help you, make the arguments const.
- How do immutable functions support code simplicity?
Since they don't change their arguments, they remove any potential complexity from the code, thus allowing programmers to understand it better.
- How do immutable functions support a simple design?
Immutable functions are boring because they only do computation. Therefore, they facilitate maintenance over long periods of time.
- What is a high-level function?
A high-level function is a function that receives another function as a parameter.
- What examples of high-level functions can you give from STL?
There are many examples of high-level functions in STL, particularly...