What is an idempotent operation?

前端 未结 15 1206
情话喂你
情话喂你 2020-11-22 03:27

What is an idempotent operation?

15条回答
  •  面向向阳花
    2020-11-22 03:34

    An idempotent operation over a set leaves its members unchanged when applied one or more times.

    It can be a unary operation like absolute(x) where x belongs to a set of positive integers. Here absolute(absolute(x)) = x.

    It can be a binary operation like union of a set with itself would always return the same set.

    cheers

提交回复
热议问题