array->insert

Inserts an item.

Target member

Signature

1array->insert(value, position::integer= ?)

Inserts an item.

array->insert is called with member syntax on a receiver value. array->insert is useful when moving through groups of values. Prefer collection operations that match the shape of the data rather than converting everything to strings.

Parameters

value
Required value. Supply value positionally unless the signature shows a keyword form.
position
Optional value of type integer. Supply position positionally unless the signature shows a keyword form.

Examples

Basic call

1local(a) = array2#a->insert('Ada')
The example shows the normal call shape. Adapt variable names, validation, and surrounding error handling to the context.