In scala, functions can be composed from other functions. It is a process of composing in which a function represents the application of two composed functions.
Let's see an example.
object MainObject {
def main(args: Array[String]) = {
var result = multiplyBy2(add2(10)) // Function composition