2

I'm looking for a term that describes this property:

For any x in the domain of function f, f(x) == f(f(x))

For example, mod has that property:

5 % 2 = 1
5 % 2 % 2 % 2 % 2 % 2 = 1

But percent-encoding and -decoding do not:

encode('fifty%') = 'fifty%25'
encode(encode('fifty%')) = 'fifty%2525'

decode('%252f') = '%2f'
decode(decode('%252f')) = '/'
7
  • This question might be better suited to math.stackexchange.com, since it's about functions in the theoretical sense, not programming per se.
    – IMSoP
    Jul 26, 2014 at 0:44
  • I considered it, but the examples that kept coming out of my brain were programming-oriented, and I knew that this community would rise to the challenge.
    – kdbanman
    Jul 26, 2014 at 0:45
  • For reference, Wikipedia mentions that in programming the term is sometimes used slightly differently: en.wikipedia.org/wiki/Idempotence#Computer_science_meaning
    – JKillian
    Jul 26, 2014 at 0:47
  • 1
    @JKillian eat! Turns out "nullipotence" is a thing too.
    – kdbanman
    Jul 26, 2014 at 0:49
  • "Idempotence" is a term mostly used (in the computing arena) to refer to network services where a request has the same effect whether it's repeated once or multiple times. Eg, if the first request adds a record to a database, subsequent identical requests will leave the DB unchanged. This is the basis of the REST "meta-architecture" for web services.
    – Hot Licks
    Jul 26, 2014 at 1:13

2 Answers 2

1

Idempotence.

Shortest answer I've ever written — I had to add this sentence to meet SO's minimum post length. :-)

6
  • 1
    It could (and should) be usefully longer. Jul 26, 2014 at 0:42
  • 1
    @user2864740, the answer pretty succinctly addresses my problem. What do you suggest?
    – kdbanman
    Jul 26, 2014 at 0:43
  • 1
    @user2864740: What more is there to say?
    – Blender
    Jul 26, 2014 at 0:44
  • I (although probably biased) think this answers the question quite well enough. :)
    – JKillian
    Jul 26, 2014 at 0:45
  • Why not remove that noisy sentence with a definition? No need to brag about posting a super-short answer.
    – Jamal
    Jul 26, 2014 at 0:51
0

The term your looking for is "Idempotence."

See http://en.wikipedia.org/wiki/Idempotence

2
  • So, what does this mean? Without having to click a link? Jul 26, 2014 at 0:43
  • 1
    Link-only answers are still sloppy. Jul 26, 2014 at 0:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.