alltom.com,
Archive,
Currently Reading,
Have Read,
Micro.blog
Subscribe with RSS or @tom@micro.alltom.com
TIL the difference between With and ReplaceAll in Mathematica. I thought this would produce the same value twice:
a = b;
With[{b = 42}, a]
ReplaceAll[a, b -> 42]
But the second line evaluates to b and the third line to 42.
With evaluates before the substitution from a to b.