SequenceableCollection.st
changeset 19832 f20ea3e31ce4
parent 19819 e7676f4fed11
child 19854 38cd3b490dc5
child 19862 6c010853ea32
equal deleted inserted replaced
19831:5e0f261a1daa 19832:f20ea3e31ce4
  1527     "
  1527     "
  1528      |a|
  1528      |a|
  1529      a := #(1 2 3 4 5 6).
  1529      a := #(1 2 3 4 5 6).
  1530      a removeLast.
  1530      a removeLast.
  1531      a
  1531      a
       
  1532     "
       
  1533 !
       
  1534 
       
  1535 removeToIndex:index
       
  1536     "remove the elements stored at indexes from 1 to index to the beginning.
       
  1537      Return the receiver.
       
  1538 
       
  1539      Notice, that this is modifies the receiver - NOT a copy;
       
  1540      therefore any other users of the receiver will also see this change.
       
  1541      Also note, that it may be a slow operation for some collections,
       
  1542      due to the grow:-message, which is inefficient for fixed size
       
  1543      collections (i.e. for Strings and Arrays it is not recommened)."
       
  1544 
       
  1545     ^ self removeFromIndex:1 toIndex:index
       
  1546 
       
  1547     "
       
  1548      |t|
       
  1549      t := #(1 2 3 4 5 6 7 8 9 0) asOrderedCollection.
       
  1550      t removeToIndex:3.
       
  1551      t
  1532     "
  1552     "
  1533 ! !
  1553 ! !
  1534 
  1554 
  1535 !SequenceableCollection methodsFor:'combinatoric'!
  1555 !SequenceableCollection methodsFor:'combinatoric'!
  1536 
  1556