#FEATURE by cg
authorClaus Gittinger <cg@exept.de>
Wed, 03 Apr 2019 12:42:17 +0200
changeset 4935 2044cf9f3790
parent 4934 91b2585d2cba
child 4936 1fec124a7fc7
#FEATURE by cg class: Stack added: #drop:
Stack.st
--- a/Stack.st	Wed Apr 03 12:41:40 2019 +0200
+++ b/Stack.st	Wed Apr 03 12:42:17 2019 +0200
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
 "
  COPYRIGHT (c) 1996 by Claus Gittinger
               All Rights Reserved
@@ -95,6 +97,14 @@
 
 !Stack methodsFor:'accessing'!
 
+drop:n
+    "remove n elements from the top of the stack."
+
+    ^ self dropLast:n
+
+    "Created: / 03-04-2019 / 12:42:04 / Claus Gittinger"
+!
+
 pop
     "Answer the object on top of the stack."
 
@@ -137,10 +147,10 @@
 !Stack class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic2/Stack.st,v 1.10 2015-02-03 14:17:52 cg Exp $'
+    ^ '$Header$'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libbasic2/Stack.st,v 1.10 2015-02-03 14:17:52 cg Exp $'
+    ^ '$Header$'
 ! !