Testing
assert(condition[, message])
Asserts that a condition is true.
conditionmust be a boolean.message(optional) must be a string.
assert_eq(a, b)
Asserts that two values are equal.
Output
print(...values)
Prints values to stdout (space-separated) and returns nil.
Lists and strings
count(list)
Returns the number of elements in a list.
first(list) / last(list)
Returns the first/last element of a list.
If the list is empty, returns nil.
length(x)
Returns the length of a list or a string.
Math
sum(list)
Sums numeric elements of a list and returns an integer.
abs(x)
Absolute value.
min(a, b) / max(a, b)
Returns the minimum/maximum of two numbers.
min(list) / max(list)
Returns the minimum/maximum element of a list.
If the list is empty, returns nil.