Example:
# Example for all println all([1,1,1]) # true
Example:
# Example for any println any([0,1,0]) # true
Returns new_list containing item appended to list. If list is omitted then a new list is created containing item.
Example:
# Example for append var lst=[1,2,3] lst=append(lst,4) println lst # [1,2,3,4]
Appends item to local_list_name. Returns bool_success depending on success.
Example:
# Example for append_to
append_to("list",[1])
Calculate the average value in a list. Supports multi-dimensional arrays.
Example:
# Example for avg println avg([1,2,3]) # 2
Creates a list from a particular column of line separated string.
Example:
# Example for col
println col("a b\nc d",2) # ["b","d"]
(deprecated) Concatenates two lists and returns the result.
Is list empty?
Example:
# Example for empty var lst=[1,2,3] println empty(lst) # false
Checks that all lists or strings contained in the input are of equal length.
Example:
# Example for eqlen println eqlen([[1,2],[3,4]]) # true
Split list at position pos (1-based). Each side is put into variables var1 and var2.
Example:
# Example for esplit var lst=[1,2,3,4,5] esplit(lst,"l","r",3) println l # [1,2] println r # [3,4,5]
Sorts a newline separated string nl_string in ascending or descending (bool_reverse==true) order on key field.
Example:
# Example for fieldsort var text="4 one\n2 two\n3 three\n1 four" println fieldsort(text,1,"n",false)
Returns the head element of a list.
Example:
# Example for head var lst=[1,2,3,4] println head(lst) # 1
Returns a new_list with item inserted in list at position pos. (1-based)
Example:
# Example for insert println insert([1,2,3],2,9) # [1,9,2,3]
Returns list as a list of big float containers. Invalid elements are discarded.
Returns list as a list of big integer containers. Invalid elements are discarded.
Returns int_or_string_list as a list of boolean values, with invalid items removed.
sets all elements of a list to value. Big number types not yet supported.
Returns int_or_string_list as a list of floats, with invalid items removed.
Returns float_or_string_list as a list of integers. Invalid items will generate an error.
Returns list as a list of 64-bit integers.
Converts list to a list of strings.
Calculate the maximum value in a list. Supports multi-dimensional arrays.
Example:
# Example for max var lst=[1.2, 3, 2.3, 4] println max(lst) # 4
Calculate the minimum value in a list. Supports multi-dimensional arrays.
Example:
# Example for min println min([3,2,5]) # 2
Returns a copy of the last item in the list list_name. Returns an error if the list is empty.
Example:
# Example for peek
var lst=[1,2,3]
println peek("lst") # 3
Removes and returns the last item in the named list list_name.
Example:
# Example for pop
var lst=[1,2,3]
var item=pop("lst")
println "Last item:",item
Adds item to the front of list. If only an item is provided, then a new list is started.
Example:
# Example for push_front var lst=[1,2,3] lst=push_front(lst,0) println lst # [0,1,2,3]
Returns a new_list with the item at position pos removed. 1-based.
Example:
# Example for remove println remove([1,2,3],2) # [1,3]
Creates a list from the intermediary values of processing op_string while iterating over list.
Example:
# Example for scan_left println scan_left([1,2,3,4],"+",0) # [1,3,6,10]
Sorts a list in ascending or descending (bool_reverse==true) order, or with map options.
[#SOL]Map options: .reverse (bool), .numeric (bool, .alphanumeric (bool)
Example:
# Example for sort var l=[3,1,2] println sort(l) # [1,2,3]
Sorts a list of structs, on a given field name, in ascending (true) or descending (false) order.
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]) # 6
Returns a new list containing all items in list except the head item.
Example:
# Example for tail println tail([1,2,3]) # [2,3]
Returns list sorted with duplicate values removed.
Example:
# Example for uniq var lst=[1,2,2,3,3,3] println uniq(lst) # [1,2,3]
Creates a list by combining each element of list1 and list2.
Example:
# Example for zip var a=[1,2] var b=["a","b"] println zip(a,b) # [[1,"a"],[2,"b"]]