arliss_obsidian/fp/Terminology/Referential Transparency.md
Orion Kindel 3701b1e2f8
update
2024-09-23 18:56:55 -05:00

356 B

A property of Purity Functions that they can always be replaced by the expression they return.

For example add is referentially transparent, so

a = add 1 3

could be replaced with

a = 4

at design- or compile-time, because add always returns the same result and performs no observable side-effects.