I'm not sure if this problem has been asked before as I don't know the keyword to search for it.
I have a function where return result contains variable b
(just for illustration).
myfunction[a_] := Module[{},
1 + (2 a - 1) b ]
I want it to always return an expression with b
unevaluated and only evaluate it when I do some replacement.
This one works as b
is not used anywhere (not being assigned some value).
However, now assume that b
is assigned somewhere then the function below is evalued with that b
.
And in the result below with replacment the result is 4
instead of 2
as what I want.
b
local then I cannot returnb
but something like$1000
and it's hard to replace for value later. ut $\endgroup$