Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
22
Task/Stack/Slate/stack.slate
Normal file
22
Task/Stack/Slate/stack.slate
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
collections define: #Stack &parents: {ExtensibleArray}.
|
||||
"An abstraction over ExtensibleArray implementations to follow the stack
|
||||
protocol. The convention is that the Sequence indices run least-to-greatest
|
||||
from bottom to top."
|
||||
|
||||
s@(Stack traits) push: obj
|
||||
[s addLast: obj].
|
||||
|
||||
s@(Stack traits) pop
|
||||
[s removeLast].
|
||||
|
||||
s@(Stack traits) pop: n
|
||||
[s removeLast: n].
|
||||
|
||||
s@(Stack traits) top
|
||||
[s last].
|
||||
|
||||
s@(Stack traits) top: n
|
||||
[s last: n].
|
||||
|
||||
s@(Stack traits) bottom
|
||||
[s first].
|
||||
Loading…
Add table
Add a link
Reference in a new issue