concept pure function in category scala

This is an excerpt from Manning's book Get Programming with Scala.
In this lesson, you’ll learn about purity, a fundamental principle of functional programming. In particular, you are going to see that a pure function is total and it has no side effects: do not worry if you do not know what these terms mean, as I’ll explain them in detail later in this lesson. When coding, being able to distinguish between pure and impure functions can help you identifying and prevent bugs in your code. For example, consider the following scenario:

This is an excerpt from Manning's book Functional Programming in Scala.
We said earlier that FP means programming with pure functions, and a pure function is one that lacks side effects. In our discussion of the coffee shop example, we worked off an informal notion of side effects and purity. Here we’ll formalize this notion, to pinpoint more precisely what it means to program functionally. This will also give us additional insight into one of the benefits of functional programming: pure functions are easier to reason about.
In the first chapter of this book, we introduced the concept of referential transparency, setting the premise for purely functional programming. We declared that pure functions can’t mutate data in place or interact with the external world. In chapter 13, we learned that this isn’t exactly true. We can write purely functional and compositional programs that describe interactions with the outside world. These programs are unaware that they can be interpreted with an evaluator that has an effect on the world.