Skip to content

A dead stupid stack implementation, but one fully working :)

Notifications You must be signed in to change notification settings

pharo-containers/Containers-Stack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

89 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Containers-Stack

A dead stupid stack implementation, but one fully working with super cool coverage:)

https://github.com/pharo-containers/Containers-Stack/actions License Coverage Status

Example

| 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. 

Loading

The following script installs Containers-Stack in Pharo.

Metacello new
  baseline: 'ContainersStack';
  repository: 'github://pharo-containers/Containers-Stack:v1.0/src';
  load.

If you want to depend on it

Add the following code to your Metacello baseline or configuration

spec 
   baseline: 'ContainersStack' 
   with: [ spec repository: 'github://pharo-containers/Containers-Stack:v1.0/src' ].