The paradigm of functional programming has a lot of common features with the paradigm of declarative programming. One of the defining features of functional languages and declarative programming is the extensive use of functions. This chapter will discuss in more detail what functions are and their meaning in different paradigms. We will have a look at how we can use functions and what their role is in modern programming languages.
In this chapter, we will cover the following topics:
- Functions as behaviors
- Functions in functional programming
- Higher-order functions
- Lambdas
- The concept of functions in different programming languages