Algosim documentation: VarExtendWith

VarExtendWith

Adds elements to a container variable.

Syntax

If X is an lvalue and a container and x an object that can be part of X, or a container of such objects, then VarAppend(X, x) appends x, or, preferably, the elements of x, to the end of X and returns success.

This is the procedural version of ExtendWith.

Examples

v ≔ SequenceVector(10)
(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
VarExtendWith(v, ❨11, 12❩)
success
v
(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12)

See also