Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/abvdasker/crystal-linked-list
Simple linked list implementation in Crystal
https://github.com/abvdasker/crystal-linked-list
Last synced: about 1 month ago
JSON representation
Simple linked list implementation in Crystal
- Host: GitHub
- URL: https://github.com/abvdasker/crystal-linked-list
- Owner: abvdasker
- License: mit
- Created: 2016-08-23T04:32:52.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2020-03-24T07:31:28.000Z (over 4 years ago)
- Last Synced: 2024-08-01T17:31:54.288Z (4 months ago)
- Language: Crystal
- Size: 36.1 KB
- Stars: 13
- Watchers: 3
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-crystal - crystal-linked-list - Implementation of Linked List (Algorithms and Data structures)
- awesome-crystal - crystal-linked-list - Implementation of Linked List (Algorithms and Data structures)
- awesome-crystal - crystal-linked-list - Implementation of Linked List (Algorithms and Data structures)
README
# Crystal Linked List [![CircleCI](https://circleci.com/gh/abvdasker/crystal-linked-list.svg?style=svg)](https://circleci.com/gh/abvdasker/crystal-linked-list)
A simple linked list implementation in Crystal
## Installation
Add this to a project's `shards.yml`
```yml
dependencies:
linked_list:
git: https://github.com/abvdasker/crystal-linked-list.git
```Then run `shards`
## Usage
```crystal
require "linked_list"list = LinkedList(Int32 | String).new
list.append(1)
list.push(2)
list << "foo"list.peek # "foo"
list.pop # "foo"
list.pop # 2
list.unshift(1)
list.shift # 1
```