What is a 'Pure Function'?

What is a 'Pure Function'?

Approach: Define function with no side effects.

A function where the return value is determined only by its input values, without observable side effects.

Follow-up: Why are pure functions easier to test?

Key concepts: determinism, side effects.