Are idempotent functions the same as pure functions? -


i read wikipedia's explanation of idempotence. know means function's output determined it's input. remember heard similar concept: pure function. google them can't find difference...

are equivalent?

an idempotent function can cause idempotent side-effects.

a pure function cannot.

for example, function sets text of textbox idempotent (because multiple calls display same text), not pure.
similarly, deleting record guid (not count) idempotent, because row stays deleted after subsequent calls. (additional calls nothing)


Comments

Popular posts from this blog

java - SNMP4J General Variable Binding Error -

windows - Python Service Installation - "Could not find PythonClass entry" -

Determine if a XmlNode is empty or null in C#? -