In FP, functions are first-class citizens—this means that they are treated like any other values and can be passed as arguments to other functions or be returned as a result of a function. In FP, it is also possible to work with functions in the so-called literal form, with no need to name them. Let's look at the following Scala example:
val integerSeq = Seq(7, 8, 9, 10)
integerSeq.filter(i => i % 2 == 0)
i => i % 2 == 0 is a function literal without a name. It checks whether a number is even. It can be passed as another function argument or it can be used as a return value.