refactoring
This commit is contained in:
+5
-5
@@ -3,11 +3,11 @@ module 'aux.util.sort'
|
||||
include 'green_t'
|
||||
include 'aux'
|
||||
|
||||
public.EQ = 0
|
||||
public.LT = 1
|
||||
public.GT = 2
|
||||
M.EQ = 0
|
||||
M.LT = 1
|
||||
M.GT = 2
|
||||
|
||||
function public.compare(a, b, desc)
|
||||
function M.compare(a, b, desc)
|
||||
if a < b then
|
||||
return desc and GT or LT
|
||||
elseif a > b then
|
||||
@@ -17,7 +17,7 @@ function public.compare(a, b, desc)
|
||||
end
|
||||
end
|
||||
|
||||
public.multi_lt = vararg-function(arg)
|
||||
M.multi_lt = vararg-function(arg)
|
||||
for i = 1, getn(arg), 2 do
|
||||
if arg[i] and arg[i + 1] and arg[i] ~= arg[i + 1] then
|
||||
return arg[i] < arg[i + 1]
|
||||
|
||||
Reference in New Issue
Block a user