A dead stupid stack implementation, but one fully working with super cool coverage:)
| aStack |
aStack := CTStack new.
aStack push: 'a'.
aStack size >>> 1.
aStack push: 'b'.
aStack size >>> 2.
aStack top >>> 'b'.
aStack size >>> 2.
aStack pop >>> 'b'.
aStack size >>> 1.
aStack pop >>> 'a'.
aStack size >>> 0.
The following script installs Containers-Stack in Pharo.
Metacello new
baseline: 'ContainersStack';
repository: 'github://pharo-containers/Containers-Stack:v1.0/src';
load.
Add the following code to your Metacello baseline or configuration
spec
baseline: 'ContainersStack'
with: [ spec repository: 'github://pharo-containers/Containers-Stack:v1.0/src' ].