VarRemove
Removes one or more values from a linear container variable.
Syntax
-
VarRemove(X, R)-
Xis a variable that is a linear container -
Ris a range
-
If X is an lvalue and a container and R a range (see part and range), then VarRemove(X, R) removes the elements specified by R from X and returns success.
This is the procedural version of remove.
Examples
v ≔ SequenceVector(10)
(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
VarRemove(v, 5)
success
v
(1, 2, 3, 4, 6, 7, 8, 9, 10)
v ≔ SequenceVector(10)
(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
VarRemove(v, range(1, −1, 2))
success
v
⎛2 ⎞ ⎜4 ⎟ e⎜6 ⎟ ⎜8 ⎟ ⎝10⎠