2 ms·
In mathematics, variables don't change inside expressions -- they define a family of expressions, each with a different value. For example, in the function f
by clusmore 10y ago
In mathematics, variables don't change inside expressions -- they define a family of expressions, each with a different value. For example, in the function
f(x) = x^2 + x + 1
the value of x in the right-hand-side expression doesn't change in the same sense that variables in imperative languages change. But it allows the single expression "x^2 + x + 1" to have a value which varies by the value of x. For example, f(2) yields the value 7 while f(3) yields the value 13.