Pure function
A function is pure if it always turns over the same value for the same parameters. It is component referential Transparence.
Examples of pure functions
The arithmetic functions are the prototype of the pure functions.
Examples of impure functions
today () is impure because it turns over various values to various moments.
The functions with effect edge are potentially impure functions.
In the same way, a function which uses an Aggregate variable or a Variable statics is potentially impure.
The function random () is impure, because it turns over a different value to each call.
| Random links: | Abril de 2003 | Arracacia | Lachambre | Pine-the-Garenne | Yoshiaki Oshima | Pseudobalists | Dynastie_de_Zand |