Advanced
R
Q82 / 100
What does "environment(f) <- new_env" change about a function f?
Correct! Well done.
Incorrect.
The correct answer is B) It changes the enclosing environment of f, affecting how f resolves free variables (lexical scoping)
B
Correct Answer
It changes the enclosing environment of f, affecting how f resolves free variables (lexical scoping)
Explanation
A function's environment determines where it looks up variables not defined locally or passed as arguments; reassigning it changes this lexical scope.
Progress
82/100