3 ms·
Just wondering if this is an example where you are looking for dynamic scope instead of lexical scope? E.g: y = 1; expression = Block[{y},1+y]; Print[express
by rexpress 5y ago
Just wondering if this is an example where you are looking for dynamic scope instead of lexical scope? E.g:
y = 1;
expression = Block[{y},1+y];
Print[expression]
2
There are also the 'formal' symbols, e.g. https://reference.wolfram.com/language/ref/character/FormalY.html https://reference.wolfram.com/language/ref/character/FormalY... if you want a symbol that will never be assigned a value but can still be substituted using ReplaceAll etc.