in the second lecture (v2) on slide 15 is a code snipped and the question how it is evaluated with substitution/enviroments.
I understand the difference between sub. and env. and their runtime specific dis-/advantages.
But i can't see the difference in evaluation. I'm not even sure if i get the code snipped

f is defined as f(x) = n?
So, wouldn't be the result of the compution be 5 in both cases?
I mean, in the substitution case n is substituted by 5 so f(x) = 5. In the enviroment case, n is looked up and since the example uses dynamic scoping n=5 aswell -> f(x)=5.
I'm sure I missunderstood someting there. Maybe you can clarify this.
Thanks in advance!
Best
Mr.B