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 :)
- Host: GitHub
- URL: https://github.com/pharo-containers/Containers-Stack
- Owner: pharo-containers
- Created: 2019-03-14T19:24:53.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2021-01-01T16:29:28.000Z (about 4 years ago)
- Last Synced: 2024-08-03T17:09:31.061Z (5 months ago)
- Topics: collection, containers, datastructures, pharo, stack
- Language: Smalltalk
- Size: 88.9 KB
- Stars: 0
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-pharo - Stack - A stack implementation. (Data Structures)
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' ].
```