refactoring

This commit is contained in:
Manuel Simon Hirsig
2016-08-23 04:58:46 +02:00
parent 85d2e578e4
commit 5f03b95e8f
26 changed files with 209 additions and 225 deletions
+5 -5
View File
@@ -1,10 +1,10 @@
module 'sorting'
public.LT = {}
public.EQ = {}
public.GT = {}
public()
function public.compare(a, b, desc)
LT, EQ, GT = t, t, t
function compare(a, b, desc)
if a < b then
return desc and GT or LT
elseif a > b then
@@ -14,7 +14,7 @@ function public.compare(a, b, desc)
end
end
function public.multi_lt(xs, ys)
function multi_lt(xs, ys)
local i = 1
while true do
if xs[i] and ys[i] and xs[i] ~= ys[i] then