Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

https://github.com/pharo-containers/Containers-Stack

A dead stupid stack implementation, but one fully working :)
https://github.com/pharo-containers/Containers-Stack

collection containers datastructures pharo stack

Last synced: about 2 months ago
JSON representation

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

Lists

README

        

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

![https://github.com/pharo-containers/Containers-Stack/actions](https://github.com/pharo-containers/Containers-Stack/workflows/Matrix/badge.svg)
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://img.shields.io/badge/license-MIT-blue.svg)
[![Coverage Status](https://coveralls.io/repos/github/pharo-containers/Containers-Stack/badge.svg?branch=master)](https://coveralls.io/github/pharo-containers/Containers-Stack?branch=master)
## 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.

```smalltalk
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

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