list.at

Syntax

a := list.at(l,i) := a

Get/sets the value of a list at index i.

This is occasionally useful instead of using an argument because it is compatible with splitting – for example to return the fourth entry in a list of lists and return that as a list.

Note also that currently negative indices or an index range are not supported.

Since the first argument is in implicity reference, it cannot be a temporary. An intermediate local or global value must be created if this is called in an extended expression.

Returns:

a - the value in list l at index i.

Accepts:

a - the value placed list l at index i.

Arguments:

a - the list to get/set i - the index of the list to retrieve