Last active
January 15, 2018 16:44
-
-
Save raingloom/30be67c9bb8085d2f053312bcb0edf78 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--Needs Lua 5.3 and hardware signed integer support, we are doing Advanced Gender Computations. | |
return function(str) | |
local function f(m,n)if m==0 then return n+1 elseif n==0 then return f(~m,1) else return f(~m,f(m,~n))end end | |
return f(tonumber(str:sub(0,#str//2),36)or ~0,tonumber(str:sub(#str//2+1),36)or ~0)&1==0 | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment