In computer science, functional programming is a programming paradigm that
treats computation as the evaluation of mathematical functions and avoids state
and mutable data. It emphasizes the application of functions, in contrast to
the imperative programming style, which emphasizes changes in state.[1]

In practice, the difference between a mathematical function and the notion of a
"function" used in imperative programming is that imperative functions can have
side effects, changing the value of already calculated computations.
(...) Conversely, in functional code, the output value of a
function depends only on the arguments that are input to the function, so
calling a function f twice with the same value for an argument x will produce
the same result f(x) both times.