Home Segments Index Top Previous Next

413: Mainline

The answer produced by addFirst: is the object added; it is not the receiver. Thus, the answer produced by the following cascaded expression is 720—the answer produced by the final addFirst: message in the cascade; it is not the new ordered collection:

Workspace
Transcript show: 
  (OrderedCollection new 
     addFirst: 570; addFirst: 720; addFirst: 640; addFirst: 720) 
  printString; cr 
Transcript 
720