Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lambda does not capture state fields correctly #31

Open
GoogleCodeExporter opened this issue Apr 11, 2015 · 1 comment
Open

Lambda does not capture state fields correctly #31

GoogleCodeExporter opened this issue Apr 11, 2015 · 1 comment

Comments

@GoogleCodeExporter
Copy link

I've attached a test that demonstrates the current behavior of lambdas.  What 
is expected is when 
the lambda qux is called, it should print the value of the field foo when the 
lambda was initially 
created, which is "foo".  Instead, it prints "bar", the value of the field foo 
when the lambda is called.  
This is inconsistent with the typical behavior of lambdas in functional 
languages, which is to capture 
the current value of whatever variables are referenced in their bodies, 
regardless of whether those 
variables change later on.

Original issue reported on code.google.com by [email protected] on 1 Jun 2010 at 9:00

Attachments:

@GoogleCodeExporter
Copy link
Author

Original comment by [email protected] on 2 Jun 2010 at 2:38

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant