News for hackers. Stuff that matters.

idempotent

Re:Idempotence: What is it and why should I care? on Monday August 20, 2018 @07:55PM (#17805360)
A function f is idempotent if: f(f(x)) = f(x)

The "absolute value" function is idempotent: abs(abs(-42)) = abs(-42)

The "squared" function is not: sq(sq(7)) != sq(7)