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

Defining mutually recursive local variables #127

Closed
copumpkin opened this issue Mar 13, 2016 · 2 comments
Closed

Defining mutually recursive local variables #127

copumpkin opened this issue Mar 13, 2016 · 2 comments
Labels

Comments

@copumpkin
Copy link

Is this currently possible?

local foo = f(bar);
local bar = g(foo);

Or something like that? If I write literally the code above, it complains that bar isn't in scope.

@sparkprime
Copy link
Collaborator

local foo = f(bar),
      bar = g(foo);

I advise using the other syntax unless you actually need mutual recursion, though. That way it's clear when it's happening / not happening. This is something the formatter will probably enforce in future.

@copumpkin
Copy link
Author

Makes sense, thanks!
On Sun, Mar 13, 2016 at 19:12 Dave Cunningham [email protected]
wrote:

Closed #127 #127.


Reply to this email directly or view it on GitHub
#127 (comment).

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

No branches or pull requests

2 participants