Func: Add properly named aliases for logical ops

This commit is contained in:
Lars Mueller 2022-08-19 18:20:04 +02:00
parent 756867495f
commit 91fed867a1

@ -220,17 +220,14 @@ end
-- Functional wrappers for logical operators, suffixed with _ to avoid a syntax error -- Functional wrappers for logical operators, suffixed with _ to avoid a syntax error
function not_(a) function not_(a) return not a end
return not a _ENV["not"] = not_
end
function and_(a, b) function and_(a, b) return a and b end
return a and b _ENV["and"] = and_
end
function or_(a, b) function or_(a, b) return a or b end
return a or b _ENV["or"] = or_
end
-- Export environment -- Export environment
return _ENV return _ENV