mirror of
https://github.com/appgurueu/modlib.git
synced 2024-11-22 07:13:45 +01:00
Func: Add properly named aliases for logical ops
This commit is contained in:
parent
756867495f
commit
91fed867a1
15
func.lua
15
func.lua
@ -220,17 +220,14 @@ end
|
||||
|
||||
-- Functional wrappers for logical operators, suffixed with _ to avoid a syntax error
|
||||
|
||||
function not_(a)
|
||||
return not a
|
||||
end
|
||||
function not_(a) return not a end
|
||||
_ENV["not"] = not_
|
||||
|
||||
function and_(a, b)
|
||||
return a and b
|
||||
end
|
||||
function and_(a, b) return a and b end
|
||||
_ENV["and"] = and_
|
||||
|
||||
function or_(a, b)
|
||||
return a or b
|
||||
end
|
||||
function or_(a, b) return a or b end
|
||||
_ENV["or"] = or_
|
||||
|
||||
-- Export environment
|
||||
return _ENV
|
Loading…
Reference in New Issue
Block a user