Lua函数可以返回多个结果:
a, b, c = unpack({'one', 'two', 'three'})
如果我对第三个返回值不感兴趣,我可以在调用函数时选择忽略它:
a, b = unpack({'one', 'two', 'three'})
在调用函数时是否有类似的方法可以忽略前X个元素?
如果我只想要第三个返回值,我可以编写这段代码,但我想知道是否存在更简洁的代码:
_, _, c = unpack({'one', 'two', 'three'})