2021-12-14T19:21:54Z
2022-11-23T23:13:05Z
A pure function—a necessary distinction in computing, as in mathematics, a function is just a relation, and inherently “pure”—is a procedure that takes an input and returns a value without causing any side effects. This makes them very predictable and well-behaved development targets. Pure functions, like their mathematical counterparts, are therefore composable.
function
In many programming languages, a function is synonymous with a subroutine. In some, however, it carries the additional constraint that it does not produce side effects, thus making it conceptually closer to the word's meaning in mathematics.
pure function
urn:uuid:1cf4eecd-acfa-4ab2-adfc-bf3d4aac4c50