Open main menu
Home
Random
Nearby
Log in
Settings
About Kancolle Wiki
Disclaimers
Kancolle Wiki
Search
Changes
← Older edit
Newer edit →
Module:Iterator
(view source)
Revision as of 11:56, 8 October 2017
79 bytes added
,
7 years ago
no edit summary
Line 2:
Line 2:
-- more generic interface and compositions (filtering, grouping, mapping, sorting, etc.)
-- more generic interface and compositions (filtering, grouping, mapping, sorting, etc.)
-- prevent clients from infinite loops
-- prevent clients from infinite loops
+
+
local U = require('Module:Utils')
+
local EquipmentData = require('Module:EquipmentData')
+
local CollectionEquipment = require('Module:Collection/Equipment')
local Iterator = {}
local Iterator = {}
Line 32:
Line 36:
if predKey then
if predKey then
pred = function(e)
pred = function(e)
−
local EquipmentData = require('Module:EquipmentData')
local obj = EquipmentData(e)
local obj = EquipmentData(e)
return obj[predKey](obj)
return obj[predKey](obj)
end
end
end
end
−
local collection =
require
(
'Module:Collection/Equipment'
)
+
local collection =
U.copy
(
CollectionEquipment
)
local sortKey = stringKey('sort', context, n)
local sortKey = stringKey('sort', context, n)
if sortKey then
if sortKey then
がか
cssedit, gkautomate
7,064
edits