One of the most important concept in Scala and Functional Programming, is that functions are first-class values. This means functions are treated as any other data type in the language: they can be assigned to variables, passed as arguments to other functions, and returned from functions.
Treating functions as first-class values enables powerful code design capabilities, such as:
Higher-Order Functions
Function Composition
Closures and Currying






