A key pillar of functional programming is first-class functions. These are functions that can be used anywhere other types may be used; they are first-class citizens of the language. Generally, this includes the following:
- Storing functions as variables
- Passing functions as arguments to other functions
- Returning a function from another function
- Storing functions within other data structures
This concept is very similar to that of higher-order functions, which is a more mathematical expression of the idea of functions that operate with/on other functions.