Software /
code /
prosody
Comparison
util/iterators.lua @ 8389:5d866eb8f18f
util: Ignore some Lua 5.1 vs 5.2 compat things [luacheck]
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Fri, 10 Nov 2017 17:47:11 +0100 |
parent | 7355:4b4cf0167391 |
child | 8797:7b621a4a2e8d |
comparison
equal
deleted
inserted
replaced
8387:7d61431e1aa6 | 8389:5d866eb8f18f |
---|---|
10 | 10 |
11 local it = {}; | 11 local it = {}; |
12 | 12 |
13 local t_insert = table.insert; | 13 local t_insert = table.insert; |
14 local select, next = select, next; | 14 local select, next = select, next; |
15 local unpack = table.unpack or unpack; --luacheck: ignore 113 | 15 local unpack = table.unpack or unpack; --luacheck: ignore 113 143 |
16 local pack = table.pack or function (...) return { n = select("#", ...), ... }; end | 16 local pack = table.pack or function (...) return { n = select("#", ...), ... }; end -- luacheck: ignore 143 |
17 | 17 |
18 -- Reverse an iterator | 18 -- Reverse an iterator |
19 function it.reverse(f, s, var) | 19 function it.reverse(f, s, var) |
20 local results = {}; | 20 local results = {}; |
21 | 21 |