Returns true if all items in []bool evaluate to true.
Example:
# Example for alltrue println alltrue(to_typed([true, false, true], "[]bool"))
Returns true if any item in []bool evaluates to true.
Example:
# Example for anytrue println anytrue(to_typed([true, false, true], "[]bool"))
Returns new_list containing item appended to list. If list is omitted then a new list is created containing item.
Example:
# Example for append println append([1, 2, 3], 4)
Appends item to local_list_name. Returns bool_success depending on success.
Example:
# Example for append_to
mylist = [1, 2]
append_to("mylist", 3)
println mylist
Calculate the average value in a list. Supports multi-dimensional arrays.
Example:
# Example for avg println avg([10, 20, 30, 40])
Creates a list from a particular column of line separated string.
Example:
# Example for col text = "a b c\nd e f\ng h i" println col(text, 2, " ")
(deprecated) Concatenates two lists and returns the result.
Example:
# Example for concat println concat([1, 2], [3, 4])
Is list empty?
Example:
# Example for empty println empty([1, 2, 3])
Checks that all lists or strings contained in the input are of equal length.
Example:
# Example for eqlen println eqlen([[1, 2], [3, 4]])
Split list at position pos (1-based). Each side is put into variables var1 and var2.
Example:
# Example for esplit esplit([1, 2, 3], "a", "b", 2) # usage
Sorts a newline separated string nl_string in ascending or descending (bool_reverse==true) order on key field.
Example:
# Example for fieldsort
println fieldsort("b:2\na:1", 1, ":")
Returns the head element of a list.
Example:
# Example for head println head(42)
Returns a new_list with item inserted in list at position pos. (1-based)
Example:
# Example for insert println insert([1, 3], 1, 2)
Returns list as a list of big float containers. Invalid elements are discarded.
Example:
# Example for list_bigf println list_bigf([1, 2, 3])
Returns list as a list of big integer containers. Invalid elements are discarded.
Example:
# Example for list_bigi println list_bigi([1, 2, 3])
Returns int_or_string_list as a list of boolean values, with invalid items removed.
Example:
# Example for list_bool println list_bool([1, 2, 3])
sets all elements of a list to value. Big number types not yet supported.
Example:
# Example for list_fill println list_fill([1, 2, 3], 42)
Returns int_or_string_list as a list of floats, with invalid items removed.
Example:
# Example for list_float println list_float([1, 2, 3])
Returns float_or_string_list as a list of integers. Invalid items will generate an error.
Example:
# Example for list_int println list_int([1, 2, 3])
Returns list as a list of 64-bit integers.
Example:
# Example for list_int64 println list_int64([1, 2, 3])
Converts list to a list of strings.
Example:
# Example for list_string println list_string([1, 2, 3])
Calculate the maximum value in a list. Supports multi-dimensional arrays.
Example:
# Example for max println max([10, 20, 30, 40])
Calculate the minimum value in a list. Supports multi-dimensional arrays.
Example:
# Example for min println min([10, 20, 30, 40])
Returns a copy of the last item in the list list_name. Returns an error if the list is empty.
Example:
# Example for peek println peek(to_typed([1, 2, 3], "[]int"))
Removes and returns the last item in the named list list_name.
Example:
# Example for pop
mylist = [1, 2, 3]
println pop("mylist")
println mylist
Adds item to the front of list. If only an item is provided, then a new list is started.
Example:
# Example for push_front println push_front(to_typed([2, 3], "[]int"), 1)
Returns a new_list with the item at position pos removed. 1-based.
Example:
# Example for remove println remove([1, 2, 3], 1)
Creates a list from the intermediary values of processing op_string while iterating over list.
Example:
# Example for scan_left println scan_left(to_typed([1, 2, 3], "[]int"), "+", 0)
Sorts a list in ascending or descending (bool_reverse==true) order, or with map options.
Map options: .reverse (bool), .numeric (bool), .alphanumeric (bool), .key (backtick expression)
Example:
# Example for sort sort(nil) # usage
Sorts a list of structs, on a given field name, in ascending (true) or descending (false) order.
Example:
# Example for ssort println ssort([map(.name "banana"), map(.name "apple"), map(.name "cherry")], "name", true)
Calculate the sum of values. axis: -1/None=flatten, 0=first dim, 1=second dim. keepdims: preserve dimensions.
Example:
# Example for sum println sum([1, 2, 3, 4, 5])
Returns a new list containing all items in list except the head item.
Example:
# Example for tail println tail([1, 2, 3, 4, 5])
Returns list sorted with duplicate values removed.
Example:
# Example for uniq text = "apple\napple\nbanana\nbanana\nbanana\ncherry" println uniq(text)
Creates a list by combining each element of list1 and list2.
Example:
# Example for zip println zip([1, 2, 3], [1, 2, 3])