vim: rename extend(...) -> concat(...)
This commit is contained in:
parent
e9ccd1ec77
commit
0d3e8b878a
1 changed files with 2 additions and 2 deletions
|
@ -15,7 +15,7 @@ end
|
||||||
-- extend({'a', 'b'}, {'c', 'd'}) == {'a', 'b', 'c', 'd'}
|
-- extend({'a', 'b'}, {'c', 'd'}) == {'a', 'b', 'c', 'd'}
|
||||||
-- extend({1, 2}, {3, 4}, {5, 6}) == {1, 2, 3, 4, 5, 6}
|
-- extend({1, 2}, {3, 4}, {5, 6}) == {1, 2, 3, 4, 5, 6}
|
||||||
--
|
--
|
||||||
M.extend = function(...)
|
M.concat = function(...)
|
||||||
local result = {}
|
local result = {}
|
||||||
for _, tbl in ipairs {...} do
|
for _, tbl in ipairs {...} do
|
||||||
for _, v in pairs(tbl) do
|
for _, v in pairs(tbl) do
|
||||||
|
@ -33,7 +33,7 @@ end
|
||||||
M.partial = function(f, ...)
|
M.partial = function(f, ...)
|
||||||
local argv = {...}
|
local argv = {...}
|
||||||
return function(...)
|
return function(...)
|
||||||
return f(unpack(M.extend(argv, {...})))
|
return f(unpack(M.concat(argv, {...})))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue