Do you want BuboFlash to help you learning these things? Or do you want to add or correct something? Click here to log in or create user.



Tags
#python #sicp
Question
What has to be added to the environment model to enable lexical scoping?
Answer

We require two extensions to our environment model to enable lexical scoping.

  1. A parent environment: the environment in which the local function was defined.
  2. When a user-defined function is called, its local frame extends its parent environment.

Tags
#python #sicp
Question
What has to be added to the environment model to enable lexical scoping?
Answer
?

Tags
#python #sicp
Question
What has to be added to the environment model to enable lexical scoping?
Answer

We require two extensions to our environment model to enable lexical scoping.

  1. A parent environment: the environment in which the local function was defined.
  2. When a user-defined function is called, its local frame extends its parent environment.
If you want to change selection, open original toplevel document below and click on "Move attachment"

Parent (intermediate) annotation

Open it
We require two extensions to our environment model to enable lexical scoping. Each user-defined function has a parent environment: the environment in which it was defined. When a user-defined function is called, its local frame extends its parent environment.

Original toplevel document

1.6 Higher-Order Functions
enclosing function sqrt . This discipline of sharing names among nested definitions is called lexical scoping. Critically, the inner functions have access to the names in the environment where they are defined (not where they are called). <span>We require two extensions to our environment model to enable lexical scoping. Each user-defined function has a parent environment: the environment in which it was defined. When a user-defined function is called, its local frame extends its parent environment. Previous to sqrt , all functions were defined in the global environment, and so they all had the same parent: the global environment. By contrast, when Python evaluates the first tw

Summary

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

Details

No repetitions


Discussion

Do you want to join discussion? Click here to log in or create user.