A function is pure if it has no side-effects and its output is entirely dependent on its input.