User contributions for Ricewind

From Melvor Idle
Search for contributionsExpandCollapse
⧼contribs-top⧽
⧼contribs-date⧽
(newest | oldest) View ( | ) (20 | 50 | 100 | 250 | 500)

26 July 2024

  • 19:5719:57, 26 July 2024 diff hist +2,209 N Module:FunList/TableEnumeratorCreated page with "---A lightweight enumerator for tables in array form. ---@class ArrayEnumerator : Enumerator ---@field _tbl table ---@field current any ---@field index integer local ArrayEnumerator = {} ArrayEnumerator.__index = ArrayEnumerator function ArrayEnumerator.new(tbl) assert(tbl) local self = setmetatable({}, ArrayEnumerator) self._tbl = tbl self.current = nil self.index = 0 return self end function ArrayEnumerator:moveNext() local index = self.i..." current
  • 19:5219:52, 26 July 2024 diff hist +2,521 N Module:FunList/LookupCreated page with "local Enumerable = require('Module:Enumerable') local TableEnumerator = require('Module:TableEnumerator') ---@class Grouping : Enumerable ---@field key any ---@field elements table ---@field count integer local Grouping = setmetatable({}, { __index = Enumerable }) Grouping.__index = Grouping ---@return Grouping function Grouping.new(key) assert(key, 'key may not be nil') local self = setmetatable({}, Grouping) self.key = key self.elements = {} self.count..."
  • 19:4819:48, 26 July 2024 diff hist +364 N Module:FunList/EnumerableExtensions/docCreated page with "Contains all shorthand functions that convert one Enumerable object into another. Most of these functions can be chained together to result in a state machine that captures all of the applied functions. The state machine is only executed once a pairs or ipairs operator is applied to the state machine, or by manually progressing the Module:FunList/Enumerator."
  • 19:4519:45, 26 July 2024 diff hist +1,527 Module:FunList/EnumerableExtensionsNo edit summary
  • 19:3819:38, 26 July 2024 diff hist +10,579 N Module:FunList/EnumerableExtensionsCreated page with "local Enumerable = require('Module:Enumerable') local Iterators = require('Module:Iterators') -- Helper function to check if objects are equal. local function isEqual(obj1, obj2) local type1 = type(obj1) local type2 = type(obj2) if type1 ~= type2 then return false end if type1 == "number" or type1 == "string" or type1 == "boolean" then return obj1 == obj2 elseif type1 == "table" then if #obj1 ~= #obj2 then retur..."
  • 19:3819:38, 26 July 2024 diff hist +429 N Module:FunList/EnumeratorCreated page with "--- Interface definition for state object that allows enumeration. --- This interface definition really only exists to make VSCode shut up. --- @class Enumerator --- @field current any --- @field index any local Enumerator = {} Enumerator.__index = Enumerator --- @return boolean function Enumerator:moveNext() error('Abstract function') end function Enumerator:finalize() error('Abstract function') end return Enumerator" current
  • 19:3719:37, 26 July 2024 diff hist +248 N Module:FunList/Enumerable/docCreated page with "Implementation of the base Enumerable class. This class and its inheritants map the Lua pairs and ipairs functions to a state machine. Inheritants must implement the '''getEnumerator''' function that returns an Module:FunList/Enumerator object." current
  • 19:3319:33, 26 July 2024 diff hist +1,279 N Module:FunList/EnumerableCreated page with "-- Makes the class that inherits this enumerable with pairs and ipairs --- @class Enumerable local Enumerable = {} local Enumerable_mt = { __index = Enumerable, __pairs = Enumerable.getPairs, __ipairs = Enumerable.getiPairs } function Enumerable.new() local self = setmetatable({}, Enumerable_mt) return self end --- Enumerate all elements --- @param isArray? boolean --- @return Enumerator function Enumerable:getEnumerator(isArray) error("This method must be implem..." current
  • 19:3319:33, 26 July 2024 diff hist +11,579 Module:FunList/IteratorsNo edit summary
  • 19:3219:32, 26 July 2024 diff hist 0 m Module:FunList/IteratorsRicewind moved page Module:FunList/Enumerators to Module:FunList/Iterators without leaving a redirect
  • 12:5712:57, 26 July 2024 diff hist −408 Scripting and Extensions→‎List of Independent Tools current
  • 00:1200:12, 26 July 2024 diff hist +14 Skill PointsNo edit summary

23 July 2024

22 July 2024

21 July 2024

(newest | oldest) View ( | ) (20 | 50 | 100 | 250 | 500)