Edit: I tried running a few sort conditions in the command bar, but something’s screwy:

local array = {1, 6, 57, 13, 212}
table.sort(array, function(a, b)
return a < b or a % 2 < b % 2
end)
print(table.unpack(array))
-- 6, 13, 57, 212, 1

Everything there makes sense except for 1 being last. The condition should pass if the first number is either even or less than the second number, correct? One is obviously odd, but it’s less than every other member of the list, so why is it last in sort order? Am I a moron?

Unless I’m mistaken, that’s the exact same as the first condition. % is the remainder operator, and the remainder of any number divided by 1, is, well, itself.