OCLOperators append
(Adding message template to the top of the page)
(Replacing message template with parser tag)
Line 1: Line 1:
{{message|Write the content here to display this box}}
<message>Write the content here to display this box</message>
=== ->append ( object : T ) : Sequence(T) ===
=== ->append ( object : T ) : Sequence(T) ===
Returns a Sequence containing all elements of ''self'' followed by ''object''.
Returns a Sequence containing all elements of ''self'' followed by ''object''.

Revision as of 07:49, 17 June 2024

This page was created by Alexandra on 2017-08-13. Last edited by Stephanie@mdriven.net on 2025-02-10.

->append ( object : T ) : Sequence(T)

Returns a Sequence containing all elements of self followed by object.

Expression Result
Sequence{'a', 'b'}->append('c') Sequence{'a', 'b', 'c'}

Note! Append does NOT change the "source" sequence. If you want to add an object to an association, use .add

The opposite, excluding an object from a collection without changing the "source" collection - use excluding.