In Scala, functions can be written as literals. They can be assigned to any variable, can be passed to another function as an argument or can be returned from a function as a value. These functions are called first-order functions. For example, in the following code snippet, x => x*x is a first-order function which has been assigned to a value named square. val square = x => x*x