This line returns 3: x = 1; ++++x However, the value of x after the increment is only ...
I have a function-defining function SetAttributes[DefFn, HoldAll]; DefFn[f_[args___], body_] := f[args] := body; I am trying to modify this function to record ...
How can we define a function that works like f[x_]=ComputeSomething[x] and treats x as a variable that does not have a value? ...
v = Subscript[v, 0]*Sin[(Pi*S)/Subscript[S, 0]]; a = dv/ds v; a = D[v, s] returns ...
SubValues, as discussed in a previous question, are declared as follows ...
I've got a situation where I have, say 4 symbols, a, b, c and ...
When reading through the documentation, you often encounter the phrases DownValues, UpValues, ...
In a previous question on collecting terms for a multivariable polynomial, I answered with a solution that required a unused symbol to be used for a temporary substitution and back substitution. It ...
Consider the case where a symbol has multiple definitions attached to it, a /: Subscript[a,2] := 1 a[b_] := 2 a[b_, c_] := 3 How does one clear (/unset/remove) ...