HNHacker News
TopNewBestAskShowJobs

idempotent

9 karma · joined August 20, 2018

submissionscomments
idempotent··on Idempotence: What is it and why should I care?
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)