1

Is there a name for a function that should only be called once, but can safely be called multiple times without knowledge of whether it has been called before (i.e. it becomes a NOOP after the first call)?

Acorn
  • 49,061
  • 27
  • 133
  • 172
  • Does this answer your question? [What is the correct term to describe a procedure that produces the same result irrespective of how many times it is run?](https://stackoverflow.com/questions/58199210/what-is-the-correct-term-to-describe-a-procedure-that-produces-the-same-result-i) – Nate Eldredge May 16 '23 at 17:33

1 Answers1

1

You might be looking for the word idempotent, which refers in general to an operation where doing it several times has the same result as doing it once.

Nate Eldredge
  • 48,811
  • 6
  • 54
  • 82