This lesson teaches you the difference between pure and impure functions through examples of both. Pure functions are any functions whose output is solely derived from its inputs and causes no side effects in the application or outside world. Mathematical functions are examples of pure functions.
Impure functions come in a variety of shapes and sizes. Some typical examples would be:
Functional programming is built upon the use of pure functions and the strict control of side effects. Being able to recognize either type of function is a key fundamental for functional programming.