In purely functional languages, a function has no side-effects. The only thing a function can do is calculate something and return it as a result. If a function is called twice with the same parameters, it's guaranteed to return the same result. This called referential transparency.
Referential transparency and not only does it allow the compiler to reason about the program's behavior, but it also allows you to easily deduce (and even prove) that a function is correct and then build more complex functions by gluing simple functions together.
In purely functional languages, a function has no side-effects. The only thing a function can do is calculate something and return it as a result. If a function is called twice with the same parameters, it's guaranteed to return the same result. This called referential transparency.
Referential transparency and not only does it allow the compiler to reason about the program's behavior, but it also allows you to easily deduce (and even prove) that a function is correct and then build more complex functions by gluing simple functions together.
Source: Learn You a Haskell for Great Good!