Transform Code 

Normally, later With variables are unaware of earlier variables values.

In[1]:=
Click for copyable input
X
Out[1]=

This function transforms the With expression so this is no longer the case.

In[2]:=
Click for copyable input
X

Apply the function.

In[3]:=
Click for copyable input
X
Out[3]=