Comment by swiley
7 years ago
I think because in math you don’t ever have side effects you usually use composition where in programming you usually use a sequence. So to change that function in to how people would implement it means rearranging the internal stuff and then it probably wouldn’t be idempotent be either definition.
But not the reverse. If you are side effect free you must be idempotent.