Software Engineering vocabulary · Programming Concepts

Pure function

Meaning in software engineering, with examples

nounCommon term

In software engineering, pure function means: A function that returns the same result for the same inputs and has no observable effects outside its calculation.

In Turkish: saf işlev

How it is used

Used in functional programming and test design. Reading changing external state can prevent a function from being pure.

Example sentences

  1. The tax formatter is a pure function because its output depends only on its arguments.

    The example assumes formatting changes no external state and reads no changing settings.

  2. We moved file writing outside the pure function that calculates the report totals.

    Separating the write keeps the calculation independent of an observable storage effect.

Common collocations

  • write a pure function
  • pure function composition

More terms: Programming Concepts

Practise with graded reading

Reading at the right level is the fastest way to make new words stick. Pick free English books by level: