The ideal type of function in functional programming is a “pure” function. A pure function has no side effects, such as changing the contents of a database. If you call a pure function one million times with the same input, you should get the same output each of those million times.
Functional programming also emphasizes function composition, using “higher-order” functions. For example, you might have a sort() function that can sort some collection of data. However, sort() itself needs be supplied not only with the data but with some other function that knows how to compare two data elements to determine their order. sort(), therefore, might take two parameters:
The data to be sorted
Some identifier or reference to the function to use for order comparison
In this case, sort() is considered to be a “higher-order” function, as it takes another function as a parameter to help define the overall work to be performed.