locally defined functions are often called [...]because they enclose information
Answer
closures
Tags
#python #sicp
Question
locally defined functions are often called [...]because they enclose information
Answer
?
Tags
#python #sicp
Question
locally defined functions are often called [...]because they enclose information
Answer
closures
If you want to change selection, open original toplevel document below and click on "Move attachment"
Parent (intermediate) annotation
Open it The sqrt_update function carries with it some data: the value for a referenced in the environment in which it was defined. Because they "enclose"
information in this way, locally defined functions are often called closures.
Original toplevel document
1.6 Higher-Order Functions r than the
global environment.
A local function can access the environment of the enclosing function,
because the body of the local function is evaluated in an environment that
extends the evaluation environment in which it was defined.
<span>The sqrt_update function carries with it some data: the value for a
referenced in the environment in which it was defined. Because they "enclose"
information in this way, locally defined functions are often called closures.
1.6.4 Functions as Returned Values
Video:
Show
Hide We can achieve even more expressive power in our programs by creating functions
whose returned values are themselves funct
Summary
status
not learned
measured difficulty
37% [default]
last interval [days]
repetition number in this series
0
memorised 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.