3 ms·
wow, there seems to be a degree of confusion about this term, depending on the context. Mathematically speaking it means that you can apply it multiple times a
by ithkuil 13y ago
wow, there seems to be a degree of confusion about this term, depending on the context.
Mathematically speaking it means that you can apply it multiple times and get the same result, i.e. reverse(reverse(name)) == reverse(name)"
However, I heard it using it many times where the correct term would be "pure function" (one whose output is defined solely by its input). But this is clearly misleading.
I guess that the confusion stems from the use of "applying multiple times". Formally multiple function application means f(f(x)), and not simply repeating function evaluation f(x); f(x).
Furthermore I saw people distinguishing "side effect idempotence" (observed by all pure functions) and "return value idempotence".
To add more confusion to that, some some HTTP (GET/...) operations are called idempotent,
even though it's clearly not in functional sense (if you take the output of the GET and feed it as argument to another GET, you won't get the same result again), but only meaning "side effect free".