Module stdlib

Source
Expand description

Cao-Lang standard library

The standard library is injected into every Module at compilation time. Standard functions can be imported via the std module

Functionsยง

any
Returns the key of the first row that returns True from the callback
filter
Given a table and a callback that returns a bool create a new table whith the items that return true
map
Iterate on a table calling the provided callback for each row. Build a new table from the callback return values, using the same keys
max
Return the largest value in the table, or nil if the table is empty
max_by_key
min
Return the smallest value in the table, or nil if the table is empty
min_by_key
Return the smallest value in the table, or nil if the table is empty
native_minmax
native_sorted
native_to_array
sorted
sorted_by_key
standard_library
to_array
value_key_fn
A (key, value) function that returns the value given