Defining Idempotence

前端 未结 4 1860
天命终不由人
天命终不由人 2021-01-02 04:28

So \"idempotence\" can be defined as:

An action, that if performed N times has the same effect as performing the action only once.

Got it, easy enough.

4条回答
  •  长发绾君心
    2021-01-02 05:05

    Idempotence requires that the action holds for all values over its domain, i.e., f(f(x)) = f(x) for all x. Another way to think about it is that an operation is idempotent if the composition of the operation with itself is just that operation.

提交回复
热议问题