List
List queries, transformations, etc.
Lists are a series of zero or more values, all of the same fundamental type.
There can be lists of numbers, text, or records.
Lists of boolean values are not supported.
The first value of a list is at index 1 (one).
Remove one or more values from a list.
Remove a number of values from a list starting at a specified index.
Run a series of statements, giving them a new local variable
containing a list of removed values.
The list to modify.
The one-based index at which to start removing values.
If not specified, starts with the first value.
The number of values to remove.
If not specified, removes one value.
The new local variable which contains the erased values.
The statements to call with the erased values.
If no "else" branch is specified, and no values were removed,
this will be called with an empty list.
Optional statements to run if no values were removed.
Search a list for a specific value.
The [rt.NumEval] version returns the index of the value in the list.
The list to search.
The value to find.
Determine if the length of the list is zero.
The list to measure.
Determine the number of values in a list.
The list to measure.
Transform the values from one list and append the results to another.
The designated pattern is called with each value, one value at a time.
The list to push new values into.
The type of this list needs to match the type of the list being evaluated.
The pattern to call for every value in the list being evaluated.
The list being evaluated. Every value in this list will be sent to the mapping pattern.
The type of this list needs to match the type of the list being written to.
Collect one or more numbers into a list.
One or more number values to evaluate.
Remove a value from the end ( or the start ) of a list.
Remove a value from the end ( or the start ) of a list.
Run a series of statements, giving them a new local variable
containing the removed value.
The list to modify.
Control whether to remove from the front or the back of the list.
If not specified, removes from the back.
The name of a new local variable to receive the removed value.
The variable is only in scope for the duration of the "do" statements.
A series of statements to run if a value was removed.
Optional statements to run if the specified list was empty.
There are no special local variables defined when this is called.
Add a value to the end ( or the beginning ) of a list.
The list to modify.
The value to add to the list.
Control whether to add the new value to the front or to the back of the list.
If not specified, adds to the back.
Generate a list of numbers r[i] = (start + step*i) where i>=0.
Inputs are truncated to produce whole numbers.
A positive step ends the series when the returned value would exceed stop.
A negative step ends before generating a value less than stop.
Collect one or more records into a list.
All of the records must be of the same type.
One or more record values to evaluate.
Pack the values of a list down into a single value.
The designated pattern is called with a pair of parameters for each value in the list:
The pattern is expected to return the newly updated value.
The value being packed.
The pattern to call for every value in the list being reduced.
The list being reduced.
Run a series of statements for each value in a list.
Several local variables are available to those statements:
If the list was empty, this runs the else branch instead.
The list to read values from.
The name of a (new) variable, given to the "do" statements,
filled with the values from the list, one at a time.
A series of statements to run.
Optional statements to run if the specified list was empty.
There are no special local variables defined when this is called.
Reverse the order of the values in a list.
The first becomes last, the weak become strong, the list gets reversed,
all that.
The list to modify.
Create a new list from part of another list.
Start is optional, if omitted slice starts at the beginning.
If start is greater the length, an empty array is returned.
Slice doesn't include the ending index.
Negatives indices indicates an offset from the end.
When end is omitted, or if its greater than the the length of the list,
the slice will include everything from start up to and including the last value.
The list to copy values from.
The one-based index to start copying from.
See the command documentation for full details.
The one-based index of the last value to copy.
See the command documentation for full details.
Rearrange the values in a list.
The list to modify.
Use the specified field to compare values.
Optional, and only makes sense for lists containing records or objects.
When true, reorder the list by decreasing value: largest value first.
Otherwise, reorder the list by increasing value: smallest value first.
When sorting text this indicates whether the lower case letters should be considered different than upper case letters.
By default, they are considered the same.
( This uses ascii comparisons, so uppercase 'A' is considered less than lowercase 'a' )
Modify a list by adding and removing values.
The type of the values being added must match the type of the list.
( ie. Text cant be added to a list of numbers, and numbers cant be added to a list of text. )
If the starting index is negative, this begins that many values from the end of the array;
if list's length plus the start is less than zero, this begins from index zero.
If the remove count is missing, this removes all values from the start to the end;
if the remove count is zero or negative, no values are removed.
The list to modify.
The one-based index to start cutting from.
See the command documentation for full details.
The number of values to cut.
See the command documentation for full details.
Optionally, a set of new values to inject into the list,
starting at the location that was cut.
See the command documentation for full details.
Collect one or more text values into a list.
One or more text statements to evaluate.
Definitions:
Commands:
Commands
Slots:
Terms:
Slots:
Terms:
Erase:
Address
index:
optional
NumEval
count:
optional
NumEval
as:
Text
do:
Execute
repeats
else:
optional
Brancher
Slots:
Terms:
Find:
Assignment
value:
Assignment
Slots:
Terms:
empty:
Assignment
Slots:
Terms:
length:
Assignment
Slots:
Terms:
Map:
Address
using:
Text
list:
Assignment
Slots:
Terms:
list:
NumEval
repeats
Slots:
Terms:
Slots:
Terms:
Pop:
Address
front:
optional
BoolEval
as:
Text
do:
Execute
repeats
else:
optional
Brancher
Slots:
Terms:
Push:
Address
value:
Assignment
front:
optional
BoolEval
Slots:
Terms:
Slots:
Terms:
list:
RecordEval
repeats
Slots:
Terms:
Reduce:
Address
using:
Text
list:
Assignment
Slots:
Terms:
across:
Assignment
as:
Text
do:
Execute
repeats
else:
optional
Brancher
Slots:
Terms:
list:
Address
Slots:
Terms:
Slice:
Assignment
start:
optional
NumEval
end:
optional
NumEval
Slots:
Terms:
Sort:
Address
field:
optional
TextEval
descending:
optional
BoolEval
case:
optional
BoolEval
Slots:
Terms:
Splice:
Address
start:
optional
NumEval
count:
optional
NumEval
insert:
optional
Assignment
Slots:
Terms:
list:
TextEval
repeats