In programming, you'll often need to execute the same operation multiple times. What will be great is if you can write the code once and reuse it in other parts of your code. This is exactly what functions in Kotlin can do for you. In the next few minutes, you will learn what a function is, and how you construct programs in Kotlin from functions. You will also learn how to use functions so that they can represent different levels of abstraction. In computer programming, a function is a set of instructions that you execute to accomplish a specific task. Functions usually take in some data, process it, and return a result. You execute a function by invoking or calling it. Now that you know what a function is, let's build a custom function that uses print to describe the daily routine of Jack, who absolutely loves fruit. He eats fruit for breakfast, lunch, and dinner. What would Jack's day look like if you represented it in code. First, he wakes up, then gets dressed, prepares his fruit and eats it. After this, he does his work, prepares another fruit, eats it, then plays games, prepares another fruit, eats it, and finally goes to sleep. You may have noticed that the repetitive tasks are preparing and eating the fruit. Writing these tasks over and over takes time, and also makes reading the code quite difficult. How can you improve your code? You can extract those repeated lines from your code by building a function called prepareAndEatFruit. Now you don't have to repeat the code, and you guessed it, your solution is easier to read. Functions are a daily part of writing code, and this is also true for programming in Kotlin. You may already be used to calling and defining functions without even noticing it. For example, you've already been using println, which is actually a function call. You may also remember using the main function previously. Main is another example of a function. The main function has a special meaning when you use it in Kotlin. Your program looks for this function as the starting point for the path of execution. In other words, the starting point for your program. Not only can you use functions to reuse repeated code, but you can also use functions to organize your code in a way that is readable and easy to understand. When using functions, there are various rules to adhere to. But for the purposes of this video, you will only focus on one of these rules. The rule states that each function should use operations in a slightly lower level of abstraction, which means a higher level of detail. Let's explore an example of this rule of abstraction in greater detail. If you were to describe a person driving to a store using a very low-level implementation could be, grab the car keys, get in the car, start the car, and drive to the store. The idea here is to break the actions down into their component parts. A code representation of these tiny steps is that you first grab the keys, then get in the car, after this, start the car, and finally, you drive to the store. More tiny steps going to a lower level of abstraction inside each of your functions where you can state in greater detail that you open the door, get in the car, put the keys in the ignition, and start the engine. This is how you can use functions to optimize and organize your code. The names you use for your functions will also help other programmers read the code to understand the meaning of each function and navigate through the code. When your code is well organized, anyone can easily find what they're looking for. It's just like scrolling through the table of contents in a book. Good work. You're making great progress in advancing in your career as a Kotlin developer.