-
Notifications
You must be signed in to change notification settings - Fork 17.6k
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
It's impossible to recurse a anonymous function in Go without workarounds. #226
Labels
Comments
"Iteration is nice where it is useful. Same for recursion. Recursion can walk around trees, while iteration walks arrays. So there is at least a little bit need for recursion in a language..." I believe comment 1 was about implementing recursive tail calls as iteration, not for eliminating recursion. "Yes, but imagine you change "a" somewhere." Seriously? anonymous_func_for_a := func() { ... anonymous_func_for_a(); ... } a := anonymous_func_for_a; b := a; a = something_else; b() // works fine |
Owner changed to r...@golang.org. |
This issue was closed.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
by helmwo:
The text was updated successfully, but these errors were encountered: