【发布时间】:2011-12-14 07:35:03
【问题描述】:
如何在 lua 中迭代成对的表格元素?我想实现一种无副作用的循环和非循环迭代版本对。
I have table like this:
t = {1,2,3,4}
Desired output of non-circular iteration:
(1,2)
(2,3)
(3,4)
Desired output of circular iteration:
(1,2)
(2,3)
(3,4)
(4,1)
【问题讨论】: