Documentation moved.
This entry is documented with its primary interface. Open the documentation →
Function
src/math/utils.ts:239append
append(x: ParserEntity, value: ParserEntity): ParserEntityReturns a new vector with value added as its last element. The vector itself isn't changed.
A symbolic first argument keeps the call, so it can be evaluated once the vector is known.
Errors
core!UnexpectedDataType When x is a set, matrix or other non-vector value.
Parameters
| Name | Type | Description |
|---|---|---|
x | ParserEntity | The vector to add to. |
value | ParserEntity | The element to add. A vector is added as one element. |
Returns
ParserEntity — The longer vector.
Examples
append(Vector.create([1, 2]), Expression.create(3)).text(); // [1, 2, 3]