7 lines
128 B
Plaintext
7 lines
128 B
Plaintext
|
map = function(arr, f)
|
||
|
local result = {}
|
||
|
for _, x in ipairs(arr) do
|
||
|
table.insert(result, f(x))
|
||
|
end
|
||
|
return result
|
||
|
end
|