--- a/List.st Wed Apr 03 08:37:30 2019 +0200
+++ b/List.st Wed Apr 03 12:41:40 2019 +0200
@@ -245,6 +245,23 @@
"Modified (format): / 01-08-2018 / 11:51:29 / Claus Gittinger"
!
+dropLast:n
+ "remove the last n elements from the receiver collection.
+ Return the receiver."
+
+ self possiblySynchronized:[
+ | stop |
+ stop := self size.
+ super dropLast:n.
+ dependents notNil ifTrue:[
+ self changed:#removeFrom: with:(Array with:(stop - n + 1) with:stop).
+ ].
+ ].
+ ^ self
+
+ "Created: / 03-04-2019 / 12:40:35 / Claus Gittinger"
+!
+
removeAll
"remove all elements from the collection.
Returns the receiver."