When we write code in Imperative programming languages, we make this mistake of considering a procedure as a function many times without realizing it. We keep using word function commonly. Whether the written method is a function or not.
If you do not believe me then keep reading this article and you will see that.
To start with let's see what is actually a Pure Function and Impure Function
The pure function always has following:
- Accepts one or more parameters
- Each parameter...