2 ms·
Actually, foo(1, return_two_values(arg), 2) will call foo with only three values. The , truncates (or extends) the left expression to exactly one value. > re
by anonymoushn 13y ago
Actually, foo(1, return_two_values(arg), 2) will call foo with only three values. The , truncates (or extends) the left expression to exactly one value.
> return (function() end)(), 5
nil 5
> return (function() return 1,2,3,4 end)(), 5
1 5
> return 5, (function() end)()
5
> return 5, (function() return 1,2,3,4 end)()
5 1 2 3 4
> return 5, (function() return nil end)()
5 nil