If you have worked on large enterprise codebase with thousands of lines of code, I'm pretty sure that you've had more than just a few cups of coffee :) to get you through solving some particular bug in the system.
Flipping the coin over. What if you were solving the same bug, but your thousands of lines of code had no mutations to your variables! As we will see in upcoming tutorials from Chapter 2, Scala highly encourages immutability as a first class citizen in the language.
Say you had defined a variable called cupOfCoffeeEnergy which was initialized from the energy function in Step 1. Then, regardless of where you are in your thousands of lines of code, you know that the value of your cupOfCoffeeEnergy will be exactly the same!
Therefore, if your bug was a wrong value being represented for the variable cupOfCoffeeEnergy, then the solution would be to simply step through the energy function from Step 1 regardless of your thousands of lines of code!