When coding, functions are the most fundamental block of code. They provide instructions on how to perform a given task; without them, you will not be able to define how your application works. Scala treats functions as its first-class citizens: they are an essential component of your program with different uses and shapes. For example, you can use partial functions, anonymous functions, higher order functions, and more! In this lesson, you’ll review the basics of functions in Scala and analyze their different components. You’ll also see how to define a function. In the capstone for this unit, you’ll use functions to provide instructions on how to operate your vending machine.