Is there a way to use With
as follows?
variables := {a = 2, b = 3};
With[variables, a^b]
Desired output
8
Obviously the above code will actually just output
With[variables, a^b]
I know I can do something similar to this by defining a list of rules and using the operator form of ReplaceAll
, I just like the way the With
syntax looks and would prefer to use it if possible.
variables
is executed somewhere,a
andb
will be polluted. $\endgroup$ – xzczd Nov 8 '19 at 7:57With
/Block
distinct enough to keep it separate from (24036)? $\endgroup$ – Mr.Wizard Nov 8 '19 at 13:01