Pure function

A function whose result depends only on its inputs and that changes nothing else. Same input always gives the same output, so it can be tested, cached, and reordered safely.

Back to the glossary