mirror of
https://github.com/TangentFoxy/lume.git
synced 2024-11-19 07:04:24 +00:00
Renamed local memoize_nilkey -> memoize_nil
This commit is contained in:
parent
3f61d823ae
commit
5ab25046a2
4
lume.lua
4
lume.lua
@ -270,14 +270,14 @@ end
|
||||
|
||||
|
||||
local memoize_fnkey = {}
|
||||
local memoize_nilkey = {}
|
||||
local memoize_nil = {}
|
||||
|
||||
function lume.memoize(fn)
|
||||
local cache = {}
|
||||
return function(...)
|
||||
local c = cache
|
||||
for i = 1, select("#", ...) do
|
||||
local a = select(i, ...) or memoize_nilkey
|
||||
local a = select(i, ...) or memoize_nil
|
||||
c[a] = c[a] or {}
|
||||
c = c[a]
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user