ABSTRACT

A higher-order function is a function that either takes one or more functions as parameters, returns a function as a result, or both. The syntax for these is given in each of the three languages (Python, Java, and Scala), and examples demonstrate how higher-order functions can replace loops in many instances.

A function is just another kind of value. You can store functions in variables, put them in arrays or lists, pass them around as parameters, and even perform operations on them to get new functions.