We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
outer_var in the outer func wasn't changed because the anonymous inner function hadn't been called yet.
// Closures: don't mutate outer vars, instead redefine them! func outer() (func() int, int) { outer_var := 2 // NOTE outer_var is outside inner's scope inner := func() int { outer_var += 99 // attempt to mutate outer_var return outer_var // => 101 (but outer_var is a newly redefined // variable visible only inside inner) } return inner, outer_var // => 101, 2 (still!) }
I saw you made updates on the README file, but some people may also read your pdf file.
The text was updated successfully, but these errors were encountered:
Nony yet
Sorry, something went wrong.
No branches or pull requests
outer_var in the outer func wasn't changed because the anonymous inner function hadn't been called yet.
I saw you made updates on the README file, but some people may also read your pdf file.
The text was updated successfully, but these errors were encountered: