Skip to content

Instantly share code, notes, and snippets.

@raingloom
Last active January 15, 2018 16:44
Show Gist options
  • Save raingloom/30be67c9bb8085d2f053312bcb0edf78 to your computer and use it in GitHub Desktop.
Save raingloom/30be67c9bb8085d2f053312bcb0edf78 to your computer and use it in GitHub Desktop.
--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