It already does that… It’s a feature of Lua itself, if multiple values are returned on the stack and the call is placed in e.g. a function, they’ll pass all stack values to the function you call as expected (well, you get the idea).
Also be aware that if b is nothing (void function or not returning anything, not even nil) then you’ll only see a. That might be the reason why you didn’t realise it already works this way.
Because then it will basically be print(a,b) with b is nothing, so print(a)
I formulated it a bit shorthand because there’s not really a good way to simulate it with Lua statements. What I meant was: if the function doesn’t return anything (also no return nil), then b will be empty and the result would be equivalent to print(a) instead of print(a,b).