up previous next
append    --    append an object to a list


Syntax
append(ref L: LIST, E: OBJECT)

Description
Append the object E to the list L; this call returns nothing!

NOTE: the old CoCoA-4 syntax Append(L, E) is still allowed, but produces a warning; replace the call by append(ref L, E).

Example
/**/  use R ::= QQ[t,x,y,z];
/**/  L := [1,2,3];
/**/  append(ref L, 4);
/**/  L;
[1,  2,  3,  4]

See Also