Skip to content
Prev 378325 / 398502 Next

Function in default parameter value closing over variables defined later in the enclosing function

Dear Jan & Duncan,

Thanks for your replies!

On Wed, 23 Jan 2019 09:56:25 -0500
Duncan Murdoch <murdoch.duncan at gmail.com> wrote:

            
Nice explanation about closures in R inheriting not only their
explicitly captured variables, but whole environments of evaluation
(not stack) frames where they have been created.
I like this idea; I'm going to use it.