This question already has an answer here:
I am puzzled byWith
. it does not seem to work. Please see example below (I have also used Evaluate
and N
on it, to no avail).
force[x_] := a x - b x^3
With[{a = 1, b = 1}, force[1]]
a - b
Being naive, I would expect to see 0 as a result; a
and b
should have been transformed into 1 by With
.
Block
instead. – Kuba Feb 10 at 11:49