blob: abd5792931d93be3be0c0f7d1d785e5f4d9221e0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
local list = {
1,
2,
3
}
local pairs
do
local _accum_0 = { }
local _len_0 = 1
for _index_0 = 1, #list do
local i = list[_index_0]
if i % 2 == 1 then
for _index_1 = 1, #list do
local j = list[_index_1]
if j > i then
_accum_0[_len_0] = tostring(i) .. "-" .. tostring(j)
_len_0 = _len_0 + 1
end
end
end
end
pairs = _accum_0
end
return print(table.concat(pairs, ","))
|