An Input is the universe affecting the function.

An output is the function affecting the universe.

Inputs/Outputs ARE side-effects!

If we use Python as a model of computation this is a pure function, but it does nothing:

Code: Select all

` def f(): pass # Mathematical equivalent unknown `

**NOT**a pure function. It has outputs.

Code: Select all

` def g(): return 1 #Mathematical equivalent f() = 1 `

**NOT**a pure function. It mandates input.

Code: Select all

` def h(x): pass # Mathematical equivalent unknown `

**NOT**a pure function - it mandates input and produces output:

Code: Select all

` def j(x): return x. # Mathematical equivalent f(x) = x `

Code: Select all

` def k(): 2+2 # Mathematical equivalent unknown `

Mathematicians, do you even know what you are talking about when you talk about "pure functions"?