A pure function, given the same arguments, will always return the same result. It has no side effects: no mutation, no I/O, no observable interaction with the world beyond its return value. This is referential transparency — an expression can be replaced by its value without changing the program's behavior.
In Haskell, purity is not a guideline but a guarantee enforced by the type system. The language draws a bright line between pure computation and effectful interaction, using monads to sequence effects while keeping the core calculus pristine. This separation yields programs that are easier to reason about, test, and compose.
Consider the elegance: a function f :: Int -> Int promises, at the type level, that it will only map integers to integers. No hidden state, no surprise exceptions, no ambient authority. The type is both specification and contract, enforced at compile time by a type checker descended from Hindley-Milner inference.