Rev Language Reference


append - Append a value

'append' adds an element to a vector.

Usage

append(Integer[] v, Integer x)

Arguments

v : Integer[] (pass by reference)
The vector that we append.
x : Integer (pass by reference)
The value that we append.

Return Type

Details

'append' creates a new vector that is the original vector plus the extra element.

Example

a <- 1:3
b <- 4
c := append(a,b)

See Also