Closed evhub closed 6 months ago
This is also going to involve a change to statement lambda scoping such that it will automatically copy the value of variables introduced in expressions (lambdas and comprehensions). copyclosure
will still be needed to copy everything.
Statement lambdas should automatically get partially applied with the surrounding scope, even that introduced by a list comprehension or normal lambda. Easy way to do this is try to inject
locals()
, hard way is to detect all the local assignments and explicitly partially apply them.