Question: what is the difference between static and dynamic scoping?
Answer: Static scoping is also called lexical scoping. In this scoping a variable always refers to its top level environment. ... In contrast, dynamic scope requires the programmer to anticipate all possible dynamic contexts.