Module operator
A module that contains operator functions.
call (func, ...) |
Call a function with some arguments. |
index (tbl, key) |
Return the given key from a table. |
eq (x, y) |
Return the result of `x == y` |
ne (x, y) |
Return the result of `x ~= y` |
lt (x, y) |
Return the result of `x < y` |
lte (x, y) |
Return the result of `x <= y` |
gt (x, y) |
Return the result of `x > y` |
gte (x, y) |
Return the result of `x >= y` |
len (x) |
Return the length of x |
concat (x, y) |
Return x concatenated with y |
add (x, y) |
Return `x + y` |
sub (x, y) |
Return `x - y` |
mul (x, y) |
Return `x * y` |
div (x, y) |
Return `x / y` |
pow (x, y) |
Return `x ^ y` |
mod (x, y) |
Return `x % y` |
neg (x) |
Return `-x` |
and_ (x, y) |
Return the result of x and y |
or_ (x, y) |
Return the result of `x or y` |
not_ (x) |
Return `not x` |
nop (...) |
No-op function. |
table (...) |
Table function - constructs a table from the input arguments. |
optable |
This table contains all of the lua operator functions, keyed by a sensible
string representation. |
Functions
-
call (func, ...)
-
Call a function with some arguments.
Parameters:
-
index (tbl, key)
-
Return the given key from a table.
Parameters:
-
eq (x, y)
-
Return the result of `x == y`
Parameters:
-
ne (x, y)
-
Return the result of `x ~= y`
Parameters:
-
lt (x, y)
-
Return the result of `x < y`
Parameters:
-
lte (x, y)
-
Return the result of `x <= y`
Parameters:
-
gt (x, y)
-
Return the result of `x > y`
Parameters:
-
gte (x, y)
-
Return the result of `x >= y`
Parameters:
-
len (x)
-
Return the length of x
Parameters:
-
concat (x, y)
-
Return x concatenated with y
Parameters:
-
add (x, y)
-
Return `x + y`
Parameters:
-
sub (x, y)
-
Return `x - y`
Parameters:
-
mul (x, y)
-
Return `x * y`
Parameters:
-
div (x, y)
-
Return `x / y`
Parameters:
-
pow (x, y)
-
Return `x ^ y`
Parameters:
-
mod (x, y)
-
Return `x % y`
Parameters:
-
neg (x)
-
Return `-x`
Parameters:
-
and_ (x, y)
-
Return the result of x and y
Parameters:
-
or_ (x, y)
-
Return the result of `x or y`
Parameters:
-
not_ (x)
-
Return `not x`
Parameters:
-
nop (...)
-
No-op function. Returns exactly what is passed in.
Parameters:
-
table (...)
-
Table function - constructs a table from the input arguments.
Parameters:
Tables
-
optable
-
This table contains all of the lua operator functions, keyed by a sensible
string representation. See the code for more details.
Fields:
- num
The number of operations