What's difference
return f(x)
and
return (f(x))
preferably in sense of logical parsing
What's difference
return f(x)
and
return (f(x))
preferably in sense of logical parsing
A function in Lua can return any number of values (0,1,2,...)
return f(x) means "calculate f(x) and return all values returned by the function"
return (f(x)) means "calculate f(x) and return only the first value returned by the function, return nil if no values were returned"
That's why return f(x) can be compiled as a tail call but return (f(x)) can not.