say i have a function:
function func()
return 1, 2, 3
end
Is there a way to elegantly reference individual return values? such as
if func() == 1 then
print("stuff")
end
but instead reference the second or third returned value?
i realize you can do this
if ({func()})[2] == 2 then ...
but it just looks awful, and might as well just
_,v = func()
if v == 2 then ...
i'd like to do something like this
if func() == _,2 then ...