Pure function

/pjʊr ˈfʌŋkʃən/ noun

Definition

A function that always returns the same output for the same input and produces no side effects, meaning it doesn't modify any external state or interact with the outside world. Pure functions are predictable and easier to test and reason about.

Etymology

'Pure' from Latin 'purus' meaning 'clean' or 'unmixed'. In programming, the term emerged in the 1970s with functional programming research, describing functions that are 'pure' in the mathematical sense - free from external influences or modifications.

Kelly Says

A pure function is like a reliable vending machine - you put in the same coins (input) and always get the same snack (output), and it doesn't affect anything else around it. No surprises, no side effects, just predictable behavior every single time!

Related Words

Explore More Words

Get the Word Orb API

Complete word intelligence in one call. Free tier — 50 lookups/day.