Referential transparency means that an expression (such as a function call) can be replaced with its value. This requires that the expression is stateless, that is to say the expression must be pure (have no side effects) and deterministic (always give the same value for the same input). A function without side effects can return different values according to its history or its environment, for example if its output depends on the value of a local static variable or a global variable respectively.