Module operator

A module that contains operator functions.

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.

Tables

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:

  • func
  • ...
index (tbl, key)
Return the given key from a table.

Parameters:

  • tbl
  • key
eq (x, y)
Return the result of `x == y`

Parameters:

  • x
  • y
ne (x, y)
Return the result of `x ~= y`

Parameters:

  • x
  • y
lt (x, y)
Return the result of `x < y`

Parameters:

  • x
  • y
lte (x, y)
Return the result of `x <= y`

Parameters:

  • x
  • y
gt (x, y)
Return the result of `x > y`

Parameters:

  • x
  • y
gte (x, y)
Return the result of `x >= y`

Parameters:

  • x
  • y
len (x)
Return the length of x

Parameters:

  • x
concat (x, y)
Return x concatenated with y

Parameters:

  • x
  • y
add (x, y)
Return `x + y`

Parameters:

  • x
  • y
sub (x, y)
Return `x - y`

Parameters:

  • x
  • y
mul (x, y)
Return `x * y`

Parameters:

  • x
  • y
div (x, y)
Return `x / y`

Parameters:

  • x
  • y
pow (x, y)
Return `x ^ y`

Parameters:

  • x
  • y
mod (x, y)
Return `x % y`

Parameters:

  • x
  • y
neg (x)
Return `-x`

Parameters:

  • x
and_ (x, y)
Return the result of x and y

Parameters:

  • x
  • y
or_ (x, y)
Return the result of `x or y`

Parameters:

  • x
  • y
not_ (x)
Return `not x`

Parameters:

  • x
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
generated by LDoc 1.3.12