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.
variablesis executed somewhere,aandbwill be polluted. – xzczd Nov 08 '19 at 07:57With/Blockdistinct enough to keep it separate from (24036)? – Mr.Wizard Nov 08 '19 at 13:01Withis a common preposition. – Diffycue Nov 08 '19 at 19:22scopingwould help. – Alexey Popkov Nov 08 '19 at 19:27