5 ms·
Idempotent means feeding the output back in as the input will result in the same output. It might require purity, but is conceptually distinct. For example, bo
by justincredible 6y ago
Idempotent means feeding the output back in as the input will result in the same output. It might require purity, but is conceptually distinct.
For example, boolean negation is a pure function as it depends only its input and has no side-effects, but it's not idempotent since:
not(not(var)) != not(var)