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