OCLOperators prepend
(Created page with "Add an object in front of the list")
 
(Automatically adding template at the end of the page.)
 
(6 intermediate revisions by 4 users not shown)
Line 1: Line 1:
Add an object in front of the list
=== prepend ( object : T ) : OrderedSet(T) ===
Returns an OrderedSet containing ''object'' followed by all elements of ''self''.
{| class="wikitable"
!Expression
!Result
|-
|OrderedSet{'a', 'b'}->prepend('c')
|OrderedSet{'c', 'a', 'b'}
|}
[[Category:OCL Collection Operators]]
{{Edited|July|12|2024}}

Latest revision as of 15:42, 10 February 2024

prepend ( object : T ) : OrderedSet(T)

Returns an OrderedSet containing object followed by all elements of self.

Expression Result
OrderedSet{'a', 'b'}->prepend('c') OrderedSet{'c', 'a', 'b'}
This page was edited 93 days ago on 02/10/2024. What links here